You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "David Donn (JIRA)" <ji...@apache.org> on 2008/10/08 09:33:44 UTC
[jira] Created: (CONFIGURATION-338) PropertiesConfiguration should
allow variable interpolation for includes
PropertiesConfiguration should allow variable interpolation for includes
------------------------------------------------------------------------
Key: CONFIGURATION-338
URL: https://issues.apache.org/jira/browse/CONFIGURATION-338
Project: Commons Configuration
Issue Type: Improvement
Affects Versions: 1.5
Reporter: David Donn
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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CONFIGURATION-338) PropertiesConfiguration
should allow variable interpolation for includes
Posted by "Oliver Heger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CONFIGURATION-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12638055#action_12638055 ]
Oliver Heger commented on CONFIGURATION-338:
--------------------------------------------
Many thanks!
A patch would be appreciated. Any chance you could also provide a unit test?
> PropertiesConfiguration should allow variable interpolation for includes
> ------------------------------------------------------------------------
>
> Key: CONFIGURATION-338
> URL: https://issues.apache.org/jira/browse/CONFIGURATION-338
> Project: Commons Configuration
> Issue Type: Improvement
> Affects Versions: 1.5
> Reporter: David Donn
>
> 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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CONFIGURATION-338) PropertiesConfiguration
should allow variable interpolation for includes
Posted by "Oliver Heger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CONFIGURATION-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12638379#action_12638379 ]
Oliver Heger commented on CONFIGURATION-338:
--------------------------------------------
Patch applied in revision r703248. Many thanks!
(Leaving open until the patch is also applied to the configuration2 branch.)
> PropertiesConfiguration should allow variable interpolation for includes
> ------------------------------------------------------------------------
>
> Key: CONFIGURATION-338
> URL: https://issues.apache.org/jira/browse/CONFIGURATION-338
> Project: Commons Configuration
> Issue Type: Improvement
> Affects Versions: 1.5
> Reporter: David Donn
> Attachments: include-interpolation.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CONFIGURATION-338) PropertiesConfiguration should
allow variable interpolation for includes
Posted by "David Donn (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CONFIGURATION-338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Donn updated CONFIGURATION-338:
-------------------------------------
Attachment: include-interpolation.patch
I have attached my patch. It includes a test. Please let me know if there are any problems and I will fix as this feature it quite important for me so I am keen to get it included.
> PropertiesConfiguration should allow variable interpolation for includes
> ------------------------------------------------------------------------
>
> Key: CONFIGURATION-338
> URL: https://issues.apache.org/jira/browse/CONFIGURATION-338
> Project: Commons Configuration
> Issue Type: Improvement
> Affects Versions: 1.5
> Reporter: David Donn
> Attachments: include-interpolation.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CONFIGURATION-338) PropertiesConfiguration should
allow variable interpolation for includes
Posted by "Oliver Heger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CONFIGURATION-338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oliver Heger resolved CONFIGURATION-338.
----------------------------------------
Resolution: Fixed
Fix Version/s: 1.6
Assignee: Oliver Heger
The patch was also ported to the configuration2 branch.
> PropertiesConfiguration should allow variable interpolation for includes
> ------------------------------------------------------------------------
>
> Key: CONFIGURATION-338
> URL: https://issues.apache.org/jira/browse/CONFIGURATION-338
> Project: Commons Configuration
> Issue Type: Improvement
> Affects Versions: 1.5
> Reporter: David Donn
> Assignee: Oliver Heger
> Fix For: 1.6
>
> Attachments: include-interpolation.patch
>
>
> 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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.