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

HierarchicalConfiguration.subset(...) misses an entry with the key equal to the subset prefix.

    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
    • Environment:

      Commons configuration V1.4
      Loaded configuration: An ordinary commons config XML file referring to two property files.

      Description

      Having a HierarchicalConfiguration with entries alike:
      test.sample = subset title
      test.sample.boolean = true
      test.sample.int = 123456
      test.sample.text = I wish it worked!

      When performing subset("test.sample"), I get a configuration of only three entries, the "subset title" value is not present (should have an empty string key).

      The behaviour is in contradiction to Javadoc of the Configuration interface http://commons.apache.org/configuration/apidocs/org/apache/commons/configuration/Configuration.html#subset(java.lang.String)

      Seems to me, that the bug is hidden in iterating the cloned configuration, where only children of the clone are processed, but not the root itself.

        Attachments

          Activity

            People

            • Assignee:
              oheger Oliver Heger
              Reporter:
              eduard.rindt@seznam.cz Eduard Rindt
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: