commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Jackson (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CONFIGURATION-492) XMLConfiguration.getStringArray does not parse OS Environment Variables
Date Wed, 21 Mar 2012 16:15:41 GMT
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


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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message