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

DatabaseConfiguration.copy() loses list/array values

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.5
    • None
    • Type conversion
    • None

    Description

      I've found a bug where adding a list property to a BaseConfiguration, then copying that full BaseConfiguration to a DatabaseConfiguration, the list is lost and only the first element is copied to the destination DatabaseConfiguration. For example:

      BaseConfiguration bc = new BaseConfiguration();
      bc.addProperty("myList", Arrays.asList("1", "2", "3", "4");
      
      DatabaseConfiguration dc = new DatabaseConfiguration(...);
      dc.copy(bc);
      
      List list = dc.getList("myList");
      // At this point, you'll get a single element list containing only "1"
      

      Attachments

        1. ConfigurationUtil.java
          3 kB
          Scott Wells

        Activity

          People

            Unassigned Unassigned
            scwells72 Scott Wells
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: