Uploaded image for project: 'Commons Configuration'
  1. Commons Configuration
  2. CONFIGURATION-272

ConfigurationUtils.copy results in escaped "," characters no longer being escaped

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 1.5
    • Component/s: None
    • Labels:
      None
    • Environment:

      commons 1.4

      Description

      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

      1. 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:

      1. Missing "\" before ","
        SomeLongProperty=This is a test, it is only a test
        SomeOtherProperty=This is also a test\, it is also only a test

        Attachments

          Activity

            People

            • Assignee:
              oheger Oliver Heger
              Reporter:
              jmeagher John Meagher
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: