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

HierarchicalConfiguration does not support hierarchy from property files

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.6
    • 2.x
    • Expression engine
    • None
    • windows/Linux

    Description

      If you have hierarchy like this:

      persons.person.name=1
      persons.person.surName=2
      persons.person.phoneNum=3

      persons.person.name=4
      persons.person.surName=5
      persons.person.phoneNum=6

      persons.person.name=7
      persons.person.surName=8
      persons.person.phoneNum=9

      If I have a regular property configuration that loaded a file containing in the above. then I transform into HierarchicalConfiguration using: ConfigurationUtils.convertToHierarchical(configuration).

      The tree is not right.

      I can do this:

      hierarchicalConfiguration.subset("persons").subset("person(0)").getKeys()

      but this returned empty iterator:

      hierarchicalConfiguration.subset("persons").subset("person(1)").getKeys()

      Only the first person is available.

      Attachments

        Activity

          People

            Unassigned Unassigned
            yairogen yair ogen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: