You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Jochen Hebbrecht (JIRA)" <ji...@apache.org> on 2010/03/11 11:08:27 UTC

[jira] Created: (CONFIGURATION-411) XMLConfiguration: node text: first \ (backslash) of \\ (double backslash) character will not be in the configuration

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:

<working-folder>\\test\test</working-folder>

... but when I want to print out the value, I notice the content of this node changed to \test\test. 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 :-)

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


[jira] Updated: (CONFIGURATION-411) XMLConfiguration: node text: first \ (backslash) of \\ (double backslash) character will not be in the configuration

Posted by "Jochen Hebbrecht (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CONFIGURATION-411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Hebbrecht updated CONFIGURATION-411:
-------------------------------------------

    Description: 
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 \test\test. 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 :-)

  was:
I have this configuration element in my XML configuration:

<working-folder>\\test\test</working-folder>

... but when I want to print out the value, I notice the content of this node changed to \test\test. 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 :-)


> 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 \test\test. 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 :-)

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


[jira] Commented: (CONFIGURATION-411) XMLConfiguration: node text: first \ (backslash) of \\ (double backslash) character will not be in the configuration

Posted by "Oliver Heger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONFIGURATION-411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845095#action_12845095 ] 

Oliver Heger commented on CONFIGURATION-411:
--------------------------------------------

The handling of the backslash character is part of the list splitting mechanism: per default, properties containing the list delimiter character (",") are split and treated as a list of values. If the list delimiter character is part of the property value, it can be escaped using a backslash, i.e. "\,". The backslash itself can be escaped by another backslash - this is what you have hit.

You can work around the problem in the following ways:
* You can disable list delimiter parsing if you do not need it. This can be done by calling the {{setDelimiterParsingDisabled()}} method *before* the configuration is loaded.
* You can double the backslash where it is required, so your property becomes {{\\\\test\test}}.

This list splitting feature which is enabled per default has caused us many problems in the past. So we think about removing it in the next major release (of course in the commons-configuration 1.x series backwards compatibility will be kept).

Does this solve your problem? I do not think, this is really a bug.

> 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.


[jira] Updated: (CONFIGURATION-411) XMLConfiguration: node text: first \ (backslash) of \\ (double backslash) character will not be in the configuration

Posted by "Jochen Hebbrecht (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CONFIGURATION-411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Hebbrecht updated CONFIGURATION-411:
-------------------------------------------

    Attachment: xmldoublebackslash.rar

> 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:
> <working-folder>\\test\test</working-folder>
> ... but when I want to print out the value, I notice the content of this node changed to \test\test. 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 :-)

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


[jira] Issue Comment Edited: (CONFIGURATION-411) XMLConfiguration: node text: first \ (backslash) of \\ (double backslash) character will not be in the configuration

Posted by "Jochen Hebbrecht (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Resolved: (CONFIGURATION-411) XMLConfiguration: node text: first \ (backslash) of \\ (double backslash) character will not be in the configuration

Posted by "Oliver Heger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CONFIGURATION-411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oliver Heger resolved CONFIGURATION-411.
----------------------------------------

    Resolution: Invalid

The reporter agreed that this is not a bug.

> 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.


[jira] Updated: (CONFIGURATION-411) XMLConfiguration: node text: first \ (backslash) of \\ (double backslash) character will not be in the configuration

Posted by "Jochen Hebbrecht (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CONFIGURATION-411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Hebbrecht updated CONFIGURATION-411:
-------------------------------------------

    Description: 
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 :-)

  was:
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 \test\test. 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 :-)


> 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 :-)

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


[jira] Commented: (CONFIGURATION-411) XMLConfiguration: node text: first \ (backslash) of \\ (double backslash) character will not be in the configuration

Posted by "Jochen Hebbrecht (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONFIGURATION-411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845882#action_12845882 ] 

Jochen Hebbrecht commented on CONFIGURATION-411:
------------------------------------------------

Oliver,

Ok, thanks. I get it now. It's not a bug. You can close this ticket.

Regards,
Jochen

> 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.


[jira] Commented: (CONFIGURATION-411) XMLConfiguration: node text: first \ (backslash) of \\ (double backslash) character will not be in the configuration

Posted by "Oliver Heger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONFIGURATION-411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845517#action_12845517 ] 

Oliver Heger commented on CONFIGURATION-411:
--------------------------------------------

The escaping algorithm is implemented that it searches for backslash characters and then checks the following character. If this is a special character like the list delimiter or another backslash, the first backslash is dropped, and the following character is not touched. For other characters that do not have a special meaning the backslash is retained. This approach was used to minimize the impact of the escaping algorithm on existing property definitions. For instance, windows path names containing only single backslashes are not escaped.

Actually, in your case it does not make any difference whether you double the second backslash or not.

> 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.


[jira] Commented: (CONFIGURATION-411) XMLConfiguration: node text: first \ (backslash) of \\ (double backslash) character will not be in the configuration

Posted by "Jochen Hebbrecht (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONFIGURATION-411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845272#action_12845272 ] 

Jochen Hebbrecht commented on CONFIGURATION-411:
------------------------------------------------

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.


[jira] Updated: (CONFIGURATION-411) XMLConfiguration: node text: first \ (backslash) of \\ (double backslash) character will not be in the configuration

Posted by "Jochen Hebbrecht (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CONFIGURATION-411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Hebbrecht updated CONFIGURATION-411:
-------------------------------------------

    Description: 
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

  was:
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


> 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.


[jira] Updated: (CONFIGURATION-411) XMLConfiguration: node text: first \ (backslash) of \\ (double backslash) character will not be in the configuration

Posted by "Jochen Hebbrecht (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CONFIGURATION-411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Hebbrecht updated CONFIGURATION-411:
-------------------------------------------

    Description: 
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

  was:
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


> 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.


[jira] Closed: (CONFIGURATION-411) XMLConfiguration: node text: first \ (backslash) of \\ (double backslash) character will not be in the configuration

Posted by "Oliver Heger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CONFIGURATION-411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oliver Heger closed CONFIGURATION-411.
--------------------------------------


> 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.


[jira] Updated: (CONFIGURATION-411) XMLConfiguration: node text: first \ (backslash) of \\ (double backslash) character will not be in the configuration

Posted by "Jochen Hebbrecht (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CONFIGURATION-411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Hebbrecht updated CONFIGURATION-411:
-------------------------------------------

    Description: 
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

  was:
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 :-)


> 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.