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

XMLConfiguration drops attributes if a property value is a list

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 1.5
    • Component/s: None
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: