commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jochen Hebbrecht (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (CONFIGURATION-411) XMLConfiguration: node text: first \ (backslash) of \\ (double backslash) character will not be in the configuration
Date Mon, 15 Mar 2010 10:34:44 GMT

    [ https://issues.apache.org/jira/browse/CONFIGURATION-411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845272#action_12845272
] 

Jochen Hebbrecht edited comment on CONFIGURATION-411 at 3/15/10 10:33 AM:
--------------------------------------------------------------------------

Ok, thanks. But I still have one question. If the \ is needed to escape another backslash,
why shouldn't I type:
{code}\\\\test\\test{code}. So the second backslash is not escaped?

      was (Author: jochus):
    Ok, thanks. But I still have one question. If the \ is needed to escape another backslash,
why shouldn't I type: \\\\test\\test. So the second backslash is not escaped?
  
> XMLConfiguration: node text: first \ (backslash) of \\ (double backslash) character will
not be in the configuration
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: CONFIGURATION-411
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-411
>             Project: Commons Configuration
>          Issue Type: Bug
>    Affects Versions: 1.6
>            Reporter: Jochen Hebbrecht
>            Priority: Minor
>         Attachments: xmldoublebackslash.rar
>
>
> I have this configuration element in my XML configuration:
> {code}
> <working-folder>\\test\test</working-folder>
> {code}
> ... but when I want to print out the value, I notice the content of this node changed
to:
> {code} \test\test{code}
> So the first "\" has disappeared
> I've created a M2 project that simulates the problem. Just hit mvn eclipse:eclipse and
run the Test.java file :-).
> The problem is situated in: *org.apache.commons.configuration.PropertyConverter.class*.
Check the method:
> {code} public static List split(String s, char delimiter, boolean trim){code} => line
505.
> begin = 0
> c = "\"
> inEscape = true
> begin = 1
> c= "\"
> if (c \!= delimiter && c == LIST_ESC_CHAR) => only the second char will be
printed

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message