commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Heger (Commented) (JIRA)" <>
Subject [jira] [Commented] (CONFIGURATION-474) Lists don't seem to work whean loading INI files
Date Sat, 07 Jan 2012 16:29:39 GMT


Oliver Heger commented on CONFIGURATION-474:

Indeed, in contrast to the deprecated INIConfiguration, HierarchicalINIConfiguration does
not split comma-separated values. This should be added to be consistend with other configuration
implementations. However, I would suggest to disable this feature by default to stay compatible
with older versions. So in order to enable it, you would have to call {{setDelimiterParsingDisabled(false)}}
before calling {{load()}}.

Thanks for the report.
> Lists don't seem to work whean loading INI files
> ------------------------------------------------
>                 Key: CONFIGURATION-474
>                 URL:
>             Project: Commons Configuration
>          Issue Type: Bug
>    Affects Versions: 1.7
>            Reporter: Charles Leclerc
>            Priority: Minor
> 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 :
> HierarchicalINIConfiguration c = new HierarchicalINIConfiguration();
> c.load("test.ini");
> List<?> l = c.getList("val");
> => 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:!default.jspa
For more information on JIRA, see:


View raw message