commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Przemek Bruski (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CONFIGURATION-547) Handling of backslashes
Date Wed, 19 Jun 2013 14:05:20 GMT
Przemek Bruski created CONFIGURATION-547:
--------------------------------------------

             Summary: Handling of backslashes
                 Key: CONFIGURATION-547
                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-547
             Project: Commons Configuration
          Issue Type: Bug
    Affects Versions: 1.7
            Reporter: Przemek Bruski


Consider the following Unit Test:
{code}
    @Test
    public void properlyProcessesBackslash() throws Exception
    {
        final String key = "key";
        final String value = "\\\\";

        final XMLConfiguration xmlConfig = new XMLConfiguration();
        xmlConfig.addProperty(key, value);
        final StringWriter stringWriter = new StringWriter();
        xmlConfig.save(stringWriter);

        final String xml = stringWriter.toString();

        final XMLConfiguration roundTrippedXmlConfig = new XMLConfiguration();
        roundTrippedXmlConfig.load(new StringReader(xml));

        assertEquals(xmlConfig.getString(key), roundTrippedXmlConfig.getString(key));
    }
{code}

The test case fails and I think it shouldn't. The version that introduced this behaviour was
1.7, 1.6 works fine.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message