Commons Configuration
  1. Commons Configuration
  2. CONFIGURATION-118

[configuration] Loading a configuration twice creates duplicate properties

    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

      The file configurations are not cleared when the source is loaded, thus if the
      configuration is loaded twice, we end up with duplicate properties.

      public void testDoubleLoading() throws Exception

      { FileConfiguration config = new PropertiesConfiguration(); config.setFileName("conf/test.properties"); config.load(); config.load(); assertEquals("Number of elements in the 'test.integer.array' list", 2, config.getList("test.integer.array").size()); }

        Activity

        Henri Yandell made changes -
        Affects Version/s unspecified [ 12311647 ]
        Component/s Configuration [ 12311107 ]
        Key COM-1934 CONFIGURATION-118
        Project Commons [ 12310458 ] Commons Configuration [ 12310467 ]
        Assignee Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ]
        Henri Yandell made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 33814 12342086
        Emmanuel Bourg created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Emmanuel Bourg
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development