commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oded Noam" <oded.n...@adamind.com>
Subject [configuration] Preserving comments when saving properties file
Date Sun, 02 Apr 2006 17:21:14 GMT
Hey all,

I have just submitted a bug and an attached patch that modifies
PropertiesConfiguration to preserve the line comments of a properties
file when saving it. This allows for applications to change
configuration and save it, without making the file incomprehensible to
humans that may try to edit it in the future.

See http://issues.apache.org/bugzilla/show_bug.cgi?id=39182 for the
change.

Many applications would not consider this bug a problem, since they do
not allow user editing of the properties files or the do not change
properties from within the program. Therefore, comment preservation can
be disabled, and for backward compatibility (and reducing memory usage
by the properties mechanism), it is disabled by default.

I can think some improvements that may make this change even more
useful, such would be:
- Commenting out the property line when using "clearProperty"
- Pulling up the change in such way that it would apply to configuration
formats other than properties.

As well as other ideas that come to mind. Any comments would be most
welcome.

Oded Noam

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message