commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Heger (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CONFIGURATION-716) PropertiesConfiguration: Escape sequence handling different from Properties
Date Fri, 05 Oct 2018 20:07:00 GMT

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

Oliver Heger resolved CONFIGURATION-716.
----------------------------------------
       Resolution: Fixed
    Fix Version/s: 2.4

Fixed together with CONFIGURATION-715.

> PropertiesConfiguration: Escape sequence handling different from Properties
> ---------------------------------------------------------------------------
>
>                 Key: CONFIGURATION-716
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-716
>             Project: Commons Configuration
>          Issue Type: Bug
>    Affects Versions: 2.3
>            Reporter: Patrick Schmidt
>            Priority: Major
>             Fix For: 2.4
>
>
> 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 "\ ".



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message