Affects Version/s: 1.4
Fix Version/s: 1.5
Shortly we switched from ConfigurationFactory to DefaultConfigurationBuilder for parsing out configuration-files. Unfortunately the resulting Configuration-Objects show different behaviour. The following example illustrates the problem.
contents of config.xml
contents of config.properties
the output looks like this
The value of demo.prop depends on the mechanism which was used to create the Configuration-objects.
Using ConfigurationFactory gives the expected result: the list delimiters are ignored as they are escaped by backslashes.
Both attempts using a DefaultConfigurationBuilder fail; even changing the List-delimiter and disabling delimiter-processing doesn't give the expected result.
One reason for the problem is the invocation of ConfigurationUtils.copy() during internel processing. The method copies the value of the property from one configuration into another. During insertion of the property, the value of the property is split (StringUtils.split) a second time. Unfortunately the escape-backslashes have already been removed, as a result of the first invocation of StringUtils.split(), which happended during the initial parsing of the file. That's why the second split-invocation treats the value as list.
I see two problems
- the information about escape-characters is lost, copying a property from one configuration into another gives different results
- setListDelimiter() and setDelimiterParsingDisabled() don't work as expected