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

HierarchicalINIConfiguration can throw an exception if the global section is accessed concurrently

    XMLWordPrintableJSON

    Details

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

      Description

      If the global section of a hierarchical INI configuration is requested, a new ViewNode is created which becomes the root node of a new configuration for the global section. Nodes representing properties of the global section are added to this ViewNode. This operation temporarily changes the parent node of these nodes which may cause problems if the method is called by multiple threads concurrently. Because access to a section is a read-only operation, this should be thread-safe.

      The probability that this error happens is pretty low IMO. Therefore it should be hard to create a unit test.

      The issue can be fixed by synchronizing the add operation to the ViewNode.

        Attachments

          Activity

            People

            • Assignee:
              oheger Oliver Heger
              Reporter:
              oheger Oliver Heger
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: