[ 
https://issues.apache.org/jira/browse/CONFIGURATION-649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Oliver Heger resolved CONFIGURATION-649.
----------------------------------------
       Resolution: Fixed
    Fix Version/s: 2.2

A fix has been implemented which improves the list handling of 
XMLConfiguration. In many constellations lists defined as single string with 
delimiter characters now retain their original format when the configuration is 
saved.

The solution is not perfect, however. For instance, for list properties using a 
mixed format (multiple XML elements each of which defining multiple list items) 
the format is lost. Also if a list property is fully removed and later added 
again.

> XMLConfiguration changes list format on saving
> ----------------------------------------------
>
>                 Key: CONFIGURATION-649
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-649
>             Project: Commons Configuration
>          Issue Type: Bug
>          Components: Format
>    Affects Versions: 2.1
>            Reporter: Oliver Heger
>             Fix For: 2.2
>
>
> If the XML document loaded by the configuration contains a string property 
> with multiple values (separated by the list delimiter character), on saving, 
> this property is split into multiple nodes. So
> {noformat}
> <list>a,b,c</list>
> {noformat}
> becomes
> {noformat}
> <list>a</list>
> <list>b</list>
> <list>c</list>
> {noformat}
> This also happens if the property is not touched before saving. The reason 
> for this behavior is that on loading new nodes are created for the single 
> list items (which is required to have an internal model on which queries can 
> be executed). On saving, these nodes are considered new nodes, and thus new 
> XML elements are created for them.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to