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

PropertiesConfiguration should allow variable interpolation for includes

    XMLWordPrintableJSON

    Details

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

      Description

      It would be nice if Include files were subject to the same variable interpolation as regular properties.

      e.g. it should be possible to do
      include=${sys:myfilename}

      I think it is simply a matter of changing the call in to loadIncludeFile() PropertiesConfiguration.propertyLoaded() from:

      loadIncludeFile(files[i].trim());

      to:

      loadIncludeFile(interpolate(files[i].trim()));

      I am happy to submit a patch.

        Attachments

        1. include-interpolation.patch
          2 kB
          David Donn

          Activity

            People

            • Assignee:
              oheger Oliver Heger
              Reporter:
              dusura David Donn
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: