Uploaded image for project: 'Commons Configuration'
  1. Commons Configuration
  2. CONFIGURATION-263

XMLConfiguration drops attributes if a property value is a list

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4
    • 1.5
    • None
    • None

    Description

      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]"));
      }

      Attachments

        Activity

          People

            oheger Oliver Heger
            oheger Oliver Heger
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: