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

[configuration] Loading a configuration twice creates duplicate properties

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None
    • Operating System: All
      Platform: All

    • 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

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

            Dates

              Created:
              Updated:
              Resolved: