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

Philippe Perrault commented on CONFIGURATION-632:
-------------------------------------------------

Hi Oliver,
Here is an exampe code:
{code}
CompositeConfiguration compositeConfiguration = new CompositeConfiguration();
compositeConfiguration.addConfiguration(new 
PropertiesConfiguration("props.properties"));

String[] values = compositeConfiguration.getStringArray("key1");
System.out.println(values); // "a, b, c,"
values = compositeConfiguration.getStringArray("key2");
System.out.println(values); // "a"
{code}

with
{code:title=props1.properties}
key1 = a,b,c
key2 = ${key1}
{code}

I am expecting the get an array "a, b, c" for key2 but I get only "a"
thanks!


> Composite configuration list variable interpolation return first element only
> -----------------------------------------------------------------------------
>
>                 Key: CONFIGURATION-632
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-632
>             Project: Commons Configuration
>          Issue Type: Bug
>          Components: Interpolation
>    Affects Versions: 1.9, 2.0
>         Environment: linux
>            Reporter: Philippe Perrault
>
> CompositeConfiguration.getStringArray, with variable interpolation returns 
> only the first element of the list
> e.g.
> key1=a,b,c
> key2=${key1}
> CompositeConfiguration.getStringArray(key2) = a



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

Reply via email to