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

[configuration] Loading a configuration twice creates duplicate properties

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Bugzilla Id:
      33814

      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()); }

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: