commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Heger (Resolved) (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CONFIGURATION-474) Lists don't seem to work whean loading INI files
Date Sat, 21 Jan 2012 17:05:40 GMT

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

Oliver Heger resolved CONFIGURATION-474.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.8

Support for list delimiter parsing has been added in revision 1234362.

However, it was not possible to switch off this behavior per default because HierarchicalINIConfiguration
has constructors which directly call the load() method. At that moment the _delimiterParsingDisabled_
flag is always *false*.

So delimiter parsing now works and is enabled per default (which is alright because it is
consistent with other Configuration implementations). I added a corresponding hint to the
release notes as this may impact existing code.
                
> Lists don't seem to work whean loading INI files
> ------------------------------------------------
>
>                 Key: CONFIGURATION-474
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-474
>             Project: Commons Configuration
>          Issue Type: Bug
>    Affects Versions: 1.7
>            Reporter: Charles Leclerc
>            Assignee: Oliver Heger
>            Priority: Minor
>             Fix For: 1.8
>
>
> After loading an INI file with HierarchicalINIConfiguration, getList() and getStringArray()
alaways return 1-size sets even if the parameter is in the right form in the file. To reproduce
one only need to create a small INI file with the following content :
> {{key=val1,val2,val3}}
> The following code returns a 1-sized list :
> {code}
> HierarchicalINIConfiguration c = new HierarchicalINIConfiguration();
> c.load("test.ini");
> List<?> l = c.getList("val");
> {code}
> => l = {{["val1,val2,val3"]}} instead of {{["val1","val2","val3"]}}
> I tried to change the list delimiter, but it didn't work. Maybe it's expected, but I
haven't found anything in the doc.

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