You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2005/05/30 13:05:28 UTC
DO NOT REPLY [Bug 35119] New: -
[configuration] PropertiesConfiguration doesn't handle trailing backslashes properly
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35119>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=35119
Summary: [configuration] PropertiesConfiguration doesn't handle
trailing backslashes properly
Product: Commons
Version: Nightly Builds
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Configuration
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: ebourg@apache.org
When a .properties file is parsed, we only look at the last character to check
if the value is spread over several lines, but this is not sufficient. As
specified by the javadoc for java.util.Properties:
"Note that it is not sufficient to only examine the character preceding a line
terminator sequence to see if the line terminator is escaped; there must be an
odd number of contiguous backslashes for the line terminator to be escaped.
Since the input is processed from left to right, a non-zero even number of 2n
contiguous backslashes before a line terminator (or elsewhere) encodes n
backslashes after escape processing."
Currently this file:
key1=abc\\
key2=xyz
is parsed as a file containing a single property:
key1 -> abc\key2=xyz
It should be parsed as a configuration containing two properties:
key1 -> abc\
key2 -> xyz
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org