[
https://issues.apache.org/jira/browse/CONFIGURATION-715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16622643#comment-16622643
]
Oliver Heger commented on CONFIGURATION-715:
--------------------------------------------
It is not necessarily the goal of _PropertiesConfiguration_ to behave exactly
like java.util.Properties.
The line trimming has been done from the very first release on. So changing
this has a high potential to break client code; it would only be possible to
have an option to turn this on if required.
Can you work around the issue by implementing your own _PropertiesReader_? (The
reader can be customized.) But there is an additional (and probably superflous)
_trim()_ call in _readProperty()_ which would have to be removed.
> PropertiesConfiguration should not trim whitespace from the property value
> --------------------------------------------------------------------------
>
> Key: CONFIGURATION-715
> URL: https://issues.apache.org/jira/browse/CONFIGURATION-715
> Project: Commons Configuration
> Issue Type: Bug
> Affects Versions: 2.3
> Reporter: Patrick Schmidt
> Priority: Major
>
> Currently, PropertiesConfiguration will trim all trailing whitespace from
> property values. This is different from how java.util.Properties behaves. The
> Javadoc explicitly states
> {code:java}
> All remaining characters on the line become part of the associated element
> string{code}
> The responsible code is in the method _readProperty()_ of _PropertiesReader_.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)