[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] FYI: Avoid recursion in java.util.Properties

From: Tom Tromey
Subject: Re: [cp-patches] FYI: Avoid recursion in java.util.Properties
Date: 26 Jul 2005 17:26:35 -0600
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>>>>> "Roman" == Roman Kennke <address@hidden> writes:

Roman> This fix 'outsources' the functionality of the getProperty methods
Roman> into a private method. This avoids infinite recursion if one of the
Roman> getProperty methods is overridden in subclasses.

While this is a totally sensible way to write code, I worry that there
are classes out there that derive from Properties and just override
one of these methods, "working" because they happen to match how the
JDK delegates internally.

In this situation I would recommend a test case to determine this; and
then an @specnote or the like documenting the result.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]