Properties.list( ) Regression in 3.3
Mark Wielaard
mark@klomp.org
Wed Feb 12 23:01:00 GMT 2003
Hi,
On Wed, 2003年02月12日 at 20:55, Ranjit Mathew wrote:
> To remedy this problem we can either:
>> a. Use Runtime.defaultProperties.clone( ) to create the Properties
> object returned by System.getProperties( ).
>> b. Remove the restriction in Properties.list( ) about printing out
> default values of properties.
>> Which of the alternatives is preferable? Should I post a patch for
> the same?
b. Would be the most appropriate since the Java Class Libraries book
describes Properties.list() as follows: Unlike save(), /both/ the
default properties list and the main properties list are printed. If a
property appears in both lists, only the one in the main list is printed
[...] The format of the output generated by this method is not the same
as that generated by save() and cannot be read in using load().
But note that in our Properties implementation save() and store() both
use list() at the moment. They should not if list() is rewritten.
If you decide to write a patch for this then you might also be
interested in the following Classpath bug/support report:
http://savannah.gnu.org/support/?func=detailsupport&support_id=100559&group_id=85
Cheers,
Mark
More information about the Java
mailing list