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/03/24 21:13:26 UTC

[jira] [Updated] (CONFIGURATION-492) XMLConfiguration.getStringArray does not parse OS Environment Variables

     [ https://issues.apache.org/jira/browse/CONFIGURATION-492?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oliver Heger updated CONFIGURATION-492:
---------------------------------------
    Fix Version/s:     (was: 2.0)
                   2.x

> XMLConfiguration.getStringArray does not parse OS Environment Variables
> -----------------------------------------------------------------------
>
>                 Key: CONFIGURATION-492
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-492
>             Project: Commons Configuration
>          Issue Type: Bug
>          Components: Interpolation
>    Affects Versions: 1.8
>         Environment: Windows XP, Commons Configuration 1.8
>            Reporter: Chris Jackson
>            Priority: Minor
>             Fix For: 2.x
>
>
> When using a OS environment variable in an XMLConfiguration file, the getStringArray() method does not correctly parse multiple items in the same entry.
> XML:
> ...
> <items>{$env:items}</items>
> ...
> Windows Environment variable %items% is set to "item1,item2". 
> Code:
> ...
> String[] items = config.getStringArray("items")
> for (Sting item : items) {
>   System.out.println("Item: " + item);
> }
> ...
> Output:
> Item: item1,item2



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