Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Invalid
    • Affects Version/s: 1.6
    • Fix Version/s: 1.7
    • Component/s: Interpolation
    • Labels:
      None

      Description

      When using OverrideCombiner it seems to ignore any list nodes and always return properties/values for list node from the overridden file. See the attached files for an example of what I mean. The following code always returns the values from config-custom even if list-nodes mentions that the sysprops node is a list-node.

      URL fileURL = TestConfig.class.getResource("config-conf.xml");

      try

      { DefaultConfigurationBuilder configBuilder = new DefaultConfigurationBuilder(fileURL); CombinedConfiguration config = configBuilder.getConfiguration(true); System.out.println(config.getString("sysprops/testkey")); System.out.println(config.getString("configprops/testkey1")); }

      catch (ConfigurationException e)

      { e.printStackTrace(); }
      1. config.xml
        0.2 kB
        Aniruddh Chitre
      2. config-conf.xml
        0.8 kB
        Aniruddh Chitre
      3. config-custom.xml
        0.2 kB
        Aniruddh Chitre

        Activity

        Aniruddh Chitre created issue -
        Aniruddh Chitre made changes -
        Field Original Value New Value
        Attachment config.xml [ 12446586 ]
        Aniruddh Chitre made changes -
        Attachment config-conf.xml [ 12446587 ]
        Aniruddh Chitre made changes -
        Attachment config-custom.xml [ 12446588 ]
        Aniruddh Chitre made changes -
        Description When using OverrideCombiner it seems to ignore any list nodes and always return properties/values for list node from the overridden file.

        When using OverrideCombiner it seems to ignore any list nodes and always return properties/values for list node from the overridden file. See the attached files for an example of what I mean. The following code always returns the values from config-custom even if list-nodes mentions that the sysprops node is a list-node.

        URL fileURL = TestConfig.class.getResource("config-conf.xml");

        try
        {
        DefaultConfigurationBuilder configBuilder = new DefaultConfigurationBuilder(fileURL);
        CombinedConfiguration config = configBuilder.getConfiguration(true);
        System.out.println(config.getString("sysprops/testkey"));
        System.out.println(config.getString("configprops/testkey1"));
        }
        catch (ConfigurationException e)
        {
        e.printStackTrace();
        }
        Aniruddh Chitre made changes -
        Attachment config-conf.xml [ 12446587 ]
        Aniruddh Chitre made changes -
        Attachment config-conf.xml [ 12446589 ]
        Oliver Heger made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.7 [ 12313555 ]
        Resolution Invalid [ 6 ]
        Oliver Heger made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Aniruddh Chitre
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development