commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 33814] - [configuration] Loading a configuration twice creates duplicate properties
Date Sat, 05 Mar 2005 10:33:57 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33814>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33814





------- Additional Comments From oliver.heger@t-online.de  2005-03-05 11:33 -------
(In reply to comment #2)
> I see 2 more solutions:
> 
> - change nothing and document the load() method to make it clear that properties
> are added to the configuration and do not replace the current values.
> 
> - change the load() method to include a call to clear(), but not the other
> methods loading from a stream, a file, a url, etc.

The first solution is fine with me, especially after cross checking that
java.util.Properties.load() behaves exactly the same way.

I added some notes to the javadoc of AbstractFileConfiguration and the load()
methods of PropertiesConfiguration and XMLConfiguration. I also added two new
test cases that show that a second load() call inserts new properties rather
than replacing the old content.

For XMLConfiguration it was a little harder because I found out that the output
of the save() method is broken when multiple files were loaded. I could fix
this, which is also checked in the corresponding test class.

So I suppose this bug can be closed now?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
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