commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan Fox (JIRA)" <>
Subject [jira] [Created] (CONFIGURATION-597) Periods in INI file keys not parsed correctly
Date Wed, 04 Mar 2015 23:45:38 GMT
Ryan Fox created CONFIGURATION-597:

             Summary: Periods in INI file keys not parsed correctly
                 Key: CONFIGURATION-597
             Project: Commons Configuration
          Issue Type: Bug
    Affects Versions: 1.10
            Reporter: Ryan Fox
            Priority: Minor

I am using HierarchicalINIConfiguration.  When I try to parse an INI file with periods in
the key definitions, something goes wrong, and the periods are parsed incorrectly.  For example,
my INI file looks like


And my java code looks like

File configFile = new File("path/to/the/file.ini");
HierarchicalINIConfiguration config = new HierarchichalINIConfiguration(configFile);

config.getSection("foods").getString("breakfast.drink", null);  // null
config.getSection("foods").getString("breakfast..drink", null); // "oj"

Note the double period in the second one.  Is this something I'm doing wrong, or is there
a bug in the parser?  Are periods such as this even allowed in INI files?  I can't find anything
explicitly saying either way.

This message was sent by Atlassian JIRA

View raw message