Affects Version/s: 1.0
Fix Version/s: None
Operating System: Windows XP
I just identified a new issue with HierarchicalXMLConfiguration. The method
setProperty does not sets a property correctly.
Try out this simple piece of code:
Configuration myHierarchicalXMLConfig = new HierarchicalXMLConfiguration();
Configuration myXMLConfig = new XMLConfiguration();
The output on my WinXP system with the 1.0 release of commons configuration
using Java 1.4.2_06 is the following:
I would expect both implementations of the interface Configuration to behave the
same way. This means that also myHierarchicalXMLConfig would keep its property
"A.B" with the associated value "valueAB" after inserting the key "A".
The problem occurs in a real world scenario, if I allow my application to change
values stored in the configuration before, i.e., if I try to set a new value for
"A" after the whole configuration has been read in.
Just using XMLConfiguration instead serves as a workaround, but I cannot save a
XMLConfiguration at the moment (see solved issue 32240).
It would be nice, if this could be fixed.