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

PropertiesConfiguration: Escape sequence handling different from Properties

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.4
    • Component/s: None
    • Labels:
      None

      Description

      The escape sequence handling in PropertiesConfiguration is different from java.util.Properties.

      The Javadoc (of java.util.Properties) basically states that if an escape sequence (backslash + character) is not understood, the backslash is simply removed. PropertiesConfiguration keeps the backslash. E.g. "\ " (backslash + space) should result in just a space. This sequence is used by Properties to escape the first leading space in a property value when writing to a properties-file. PropertiesConfiguration does not understand this syntax. Also (which is technically a different issue but pretty close to this one) does not preserve leading spaces in property values when saving. One could use \u0020 to encode the first leading space, but it would be nicer if it could just use the simpler "\ ".

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                Frettman Patrick Schmidt
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: