Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 23292 invoked from network); 15 Mar 2010 10:35:55 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Mar 2010 10:35:55 -0000 Received: (qmail 88031 invoked by uid 500); 15 Mar 2010 10:35:09 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 87938 invoked by uid 500); 15 Mar 2010 10:35:08 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 87930 invoked by uid 99); 15 Mar 2010 10:35:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Mar 2010 10:35:08 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Mar 2010 10:35:05 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id DBB02234C1EE for ; Mon, 15 Mar 2010 10:34:44 +0000 (UTC) Message-ID: <624947316.263501268649284891.JavaMail.jira@brutus.apache.org> Date: Mon, 15 Mar 2010 10:34:44 +0000 (UTC) From: "Jochen Hebbrecht (JIRA)" To: issues@commons.apache.org Subject: [jira] Issue Comment Edited: (CONFIGURATION-411) XMLConfiguration: node text: first \ (backslash) of \\ (double backslash) character will not be in the configuration In-Reply-To: <1386493466.200291268302107426.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on 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} > \\test\test > {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.