commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Heger (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (CONFIGURATION-233) Incomplete interpolation in CompositeConfiguration.getList()
Date Sat, 28 Oct 2006 15:12:17 GMT
     [ http://issues.apache.org/jira/browse/CONFIGURATION-233?page=all ]

Oliver Heger resolved CONFIGURATION-233.
----------------------------------------

    Fix Version/s: Nightly Builds
       Resolution: Fixed

Patch applied. Thanks!

> Incomplete interpolation in CompositeConfiguration.getList()
> ------------------------------------------------------------
>
>                 Key: CONFIGURATION-233
>                 URL: http://issues.apache.org/jira/browse/CONFIGURATION-233
>             Project: Commons Configuration
>          Issue Type: Bug
>    Affects Versions: 1.3 Final
>         Environment: Any.
>            Reporter: Rainer Jung
>             Fix For: Nightly Builds
>
>         Attachments: commons-configuration_1_3_patch.txt
>
>
> Interpolsation is mostly done by AbstractConfiguration. All classes that override get
methods of AbstractConfiguration need to be careful not to break interpolsation.
> The class CompositeConfiguration overrides getList() to easily chain the results of getList
for its subconfigurations. The calls to getList() in the subconfigurations does interpolsation
but only inside the subconfiguration. The combined lists never get interpolated in the whole
CompositeConfiguration. So whenever a reference in the value refers to a property in another
subconfiguration, interpolation breaks.
> Since all the scalar get methods correctly interpolate between different sub configurations,
I assume, that this special behavior in getList() is not intended.
> A simple test case would be using the ConfigurationFactory with a config.xml, that uses
two property files x.properties:
> x.1=a
> x.2=b
> and y.properties:
> y=${x.1}, ${x.2}
> and then calling getList for the key "y".
> The attached patch fixes the problem locally in CompositeConfiguration. It's not very
elegant, but tries to keep the fix local.
> The patch should work for 1.2, 1.3 and trunk, since getList() in CompositeConfiguration
ist the same in these versions.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message