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

[configuration] subset() method alters XMLConfiguration when invoked

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Operating System: other
      Platform: Other

    • Bugzilla Id:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: