Commons Configuration
  1. Commons Configuration
  2. CONFIGURATION-103

[configuration] subset() method alters XMLConfiguration when invoked

    Details

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

      Operating System: other
      Platform: Other

      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.

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Jeffrey Mock
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development