Affects Version/s: 1.5
Fix Version/s: 1.6
Linux, Apache Configuration 1.5
Things used to work fine in 1.3, but now when I'm trying 1.5 my JUnit test suite is breaking when adding new properties. Here is what I'm doing,
1) I already have a configuration as following,
2) Now I need to add two new properties under <test>,
3) Here is the code I'm using,
a) First create a new HierarchicalConfiguration.Node
b) Add the node to the list
c) Call addNodes on XMLConfiguration,
I run this in a look for each new property I need to add. For first property, I get element count for the test.property as 3 (conf.getMaxIndex(key)) - so I insert at test.property(3), which is right, but for the second property I get element count as 5 --> This is wrong, it should have been 4 (because I just added 1).
I check the saved the configuration file after adding those two new properties and it looks wrong too. Here is what I get,
The total element count for test.property gives me 7 ==> I was expecting 5.
There seems to have some code change in 1.5 releated to addNodes (for ex.,
CONFIGURATION-287). I'm not sure if I need to change the way I was calling addNodes before. It works fine with 1.3, but 1.5 completely fails on adding new properties.
I do need 1.5 for other bug fixes (
CONFIGURATION-268 and some other), but I can't use it until the addNodes behave correctly.
Marking this as blocker as I'm blocked because of this issue. If there is a workaround then please let me know.