From issues-return-13841-apmail-commons-issues-archive=commons.apache.org@commons.apache.org Mon Jun 07 07:14:39 2010 Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 29467 invoked from network); 7 Jun 2010 07:14:39 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Jun 2010 07:14:39 -0000 Received: (qmail 3562 invoked by uid 500); 7 Jun 2010 07:14:39 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 3175 invoked by uid 500); 7 Jun 2010 07:14:38 -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 3167 invoked by uid 99); 7 Jun 2010 07:14:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jun 2010 07:14:37 +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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jun 2010 07:14:35 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o577EDO8009375 for ; Mon, 7 Jun 2010 07:14:13 GMT Message-ID: <30096580.211851275894853199.JavaMail.jira@thor> Date: Mon, 7 Jun 2010 03:14:13 -0400 (EDT) From: "Ricky Martin (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (CONFIGURATION-418) incorrect backslash parsing In-Reply-To: <23453927.88671275317437911.JavaMail.jira@thor> 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-418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12876140#action_12876140 ] Ricky Martin commented on CONFIGURATION-418: -------------------------------------------- I understand Oliver, although it is a bit weird. So when you need more than one consecutive backslash in a comma separated key you need to escape them twice (one for the general escaping and a second for comma separated parsing). What I do not know it is why comma separated parsing is performed in a second phase... That is the final reason for this mess, but I am sure that exceeds me ;-) Thanks a lot! > incorrect backslash parsing > --------------------------- > > Key: CONFIGURATION-418 > URL: https://issues.apache.org/jira/browse/CONFIGURATION-418 > Project: Commons Configuration > Issue Type: Bug > Affects Versions: 1.6 > Environment: Commons Configuration 1.6 > Reporter: Ricky Martin > Assignee: Oliver Heger > Priority: Minor > Attachments: Main.java, PropertyConverter.diff, sample.properties > > > I am using Commons Configuration (PropertiesConfiguration) and some of my data are windows shares: \\share1 or \\share2. The problem is the parsing return different things depending how the keys are defined. For example, these keys > share=\\\\share1 > share=\\\\share2 > are different than: > share=\\\\share1, \\\\share2 > The first one returns two backslashes ("\\share1" and "\\share2") and the second returns just one ("\share1" and "\share2"). I think the problem is in PropertyConverter line 525, cos the backslash is hidden twice when multivalue parsing is done: > if (c != delimiter && c != LIST_ESC_CHAR) > { > // no, also add escape character > token.append(LIST_ESC_CHAR); > } > In my understanding the second condition produces this strange issue and it should be like this: > if (c != delimiter) > { > // no, also add escape character > token.append(LIST_ESC_CHAR); > } > Check that cos I can be missing something... > TIA -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.