commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Heger (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CONFIGURATION-492) XMLConfiguration.getStringArray does not parse OS Environment Variables
Date Thu, 24 Mar 2016 20:13:26 GMT

     [ 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)

Mime
View raw message