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

[configuration] subset() method alters XMLConfiguration when invoked

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None
    • Operating System: other
      Platform: Other

    • 35858

    Description

      Invoking subset() on an XMLConfiguration causes the underlying hierarchy to
      change. For example, using the database example on the webpage, performing
      the following and then serializing the XMLConfiguration file will show the
      structure has been altered:

      XMLConfiguration xmlConfig = new XMLConfiguration(databaseDotXmlUrl);
      xmlConfig.subset("tables.table(0");
      xmlConfig.save("C:/AlteredDatabase.xml");

      Not sure this was the intent of the method... actually the method returns a
      new HierarchicalConfiguration object but this method has undesired side effect
      on the original configuration.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jamock@mindspring.com Jeffrey Mock
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: