You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Oliver Heger (JIRA)" <ji...@apache.org> on 2007/04/17 21:55:15 UTC

[jira] Resolved: (CONFIGURATION-263) XMLConfiguration drops attributes if a property value is a list

     [ https://issues.apache.org/jira/browse/CONFIGURATION-263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oliver Heger resolved CONFIGURATION-263.
----------------------------------------

    Resolution: Fixed

A fix was committed. In the problematic scenarios the attributes are now always added to the first list node. So if there is a XML file like that:

...
<list>
  <a name="x">test1,test2</a>
  <a name="y,z" attr="u">1,2,3</a>
</list>

the results are as following:

<list>
  <a name="x">test1</a>
  <a>test2</a>
  <a name="y,z" attr="u">1</a>
  <a>2</a>
  <a>3</a>
</list>

> XMLConfiguration drops attributes if a property value is a list
> ---------------------------------------------------------------
>
>                 Key: CONFIGURATION-263
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-263
>             Project: Commons Configuration
>          Issue Type: Bug
>    Affects Versions: 1.4
>            Reporter: Oliver Heger
>         Assigned To: Oliver Heger
>             Fix For: 1.5
>
>
> When the following test is run with the following xml the second assertEquals statement fails:
> XML:
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> <test>
> <a name="X">ABC</a>
> <a name="Y">1,2,3</a>
> </test
> TEST:
> public void testXMLConfig() throws Exception {
>   File file = new File("/xml/xmlConfigTest.xml");
>   XMLConfiguration xmlConfig = new XMLConfiguration(file);
>   xmlConfig.load();
>   assertEquals("X",xmlConfig.getProperty("a(0)[@name]"));
>   assertEquals("Y",xmlConfig.getProperty("a(1)[@name]"));
> }

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org