Commons Configuration
  1. Commons Configuration
  2. CONFIGURATION-127

[configuration] Lists in a CompositeConfiguration

    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: All
      Platform: All

      Description

      Not sure whether this is a bug, but at least it's an issue where the
      documentation differs from the actul behavior:

      The CompositeConfiguration javadoc states:
      "If you add Configuration1, and then Configuration2, any properties shared will
      mean that Configuration1 will be returned.... If Configuration1 doesn't have the
      property, then Configuration2 will be checked."

      So this would mean, if a use getList or getStringArray I only get the list
      elements from conf1 but not those from conf2, if the requested property is
      contained in both. In reality, however, I get a combined list of the values
      specified in conf1 + conf2 + any others.

      I think it would be better to behave according to the documentation and to
      return only the elements from the first matching configuration + any dynamically
      added elements from the InMemoryConfiguration.

      So, is this a bug, and will it be fixed?

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Christian Siefkes
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development