You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Oliver Heger (JIRA)" <ji...@apache.org> on 2016/01/22 21:57:39 UTC

[jira] [Commented] (CONFIGURATION-617) Incorrect multi-valued property substitution

    [ https://issues.apache.org/jira/browse/CONFIGURATION-617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15113049#comment-15113049 ] 

Oliver Heger commented on CONFIGURATION-617:
--------------------------------------------

I am not sure whether I fully understand your problem. Is this a feature request to change the way interpolation works so that all values of a property are taken into account? But in this case, the property value is a collection, and it has to be somehow embedded into the resulting string. How should this be done?

Also note that for the upcoming version 2.0 of Configuration the interpolation code has been changed significantly. The {{resolveContainerStore()}} method no longer exists. So you might want to the test this version and how it behaves.

> Incorrect multi-valued property substitution
> --------------------------------------------
>
>                 Key: CONFIGURATION-617
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-617
>             Project: Commons Configuration
>          Issue Type: Bug
>          Components: Interpolation
>    Affects Versions: 1.10
>            Reporter: Alex Lopashev
>
> According to [AbstractConfiguration#resolveContainerStore|http://grepcode.com/file/repo1.maven.org/maven2/commons-configuration/commons-configuration/1.10/org/apache/commons/configuration/AbstractConfiguration.java#AbstractConfiguration.resolveContainerStore%28java.lang.String%29] code and documentation it uses only first value if array/collection property value. 
> Such behavior is broken in a trivial situation: 
> {{a=1,2,3}}
> {{b=$\{a\} ⇒ b=1}}
> The solution will be to stop using logic in {{resolveContainerStore(key)}} and just use {{getProperty(key)}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)