You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Oliver Heger (JIRA)" <ji...@apache.org> on 2007/08/20 20:01:35 UTC

[jira] Resolved: (CONFIGURATION-272) ConfigurationUtils.copy results in escaped "," characters no longer being escaped

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

Oliver Heger resolved CONFIGURATION-272.
----------------------------------------

    Resolution: Fixed
      Assignee: Oliver Heger  (was: Emmanuel Bourg)

The new append() and copy() methods (as described in my last comment) have been added to AbstractConfiguration. These methods should be used in future. They are able to correctly deal with list delimiters.

> ConfigurationUtils.copy results in escaped "," characters no longer being escaped
> ---------------------------------------------------------------------------------
>
>                 Key: CONFIGURATION-272
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-272
>             Project: Commons Configuration
>          Issue Type: Bug
>    Affects Versions: 1.4
>         Environment: commons 1.4
>            Reporter: John Meagher
>            Assignee: Oliver Heger
>             Fix For: 1.5
>
>
> When using ConfigurationUtils.copy to go between configuration formats any escaped out "," characters are put into the output configuration without the escape character.  This results in a different value being returned from getString calls as it now things the property is a list.  If 4 escape characters are used instead of the expected 1 then the copy will end up with the correct value, but then the original will end up with the escape character as part of the property value.  
> Example:
> SomeLongProperty=This is a test\, it is only a test
> # Ends up right in the copy, but not right in the original
> SomeOtherProperty=This is also a test\\\\, it is also only a test
> After copy:
> # Missing "\" before ","
> SomeLongProperty=This is a test, it is only a test
> SomeOtherProperty=This is also a test\, it is also only a test

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.