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

HierachicalINIConfiguration section access without dotted notation

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: 1.7
    • Component/s: Expression engine
    • Labels:
      None

      Description

      Setting section properties of previously non-existent Sections using getSection().setProperty() fails.

      Using a non existing filename for f, the following produces an empty file.

      ini = HierarchicalINIConfiguration(f)
      section = ini.getSection("section")
      section.setProperty("foo", "bar")
      ini.save()

      Accessing SubnodeConfigurations after clearing them fails.

      using an existing file with an existing section, produces an empty file.

      ini = new HierarchicalINIConfiguration(f);
      subnode = ini.getSection("section");
      if (! subnode.isEmpty() ) {
      subnode.clear();
      }
      subnode.setProperty("foo", "bar");
      ini.save();

        Attachments

        1. BugTest.java
          1 kB
          fragfutter

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                fragfutter fragfutter
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: