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

SubsetConfiguration does not interpolate keys of the parent

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: 1.7
    • Component/s: Interpolation
    • Labels:
      None

      Description

      A SubsetConfiguration does not interpolate the keys of a parent configuration. This is in contrast to the SubnodeConfiguration. This fails:

      BaseConfiguration config = new BaseConfiguration();
      config.setProperty("test", "junit");
      config.setProperty("prefix.key", "${test}");
      AbstractConfiguration subset = (AbstractConfiguration) config.subset("prefix");
      assertEquals("Interpolation does not resolve parent keys", "junit", subset.getString("key", ""));
      

        Attachments

          Activity

            People

            • Assignee:
              joehni Joerg Schaible
              Reporter:
              joehni Joerg Schaible
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: