Michal Grzybek created CONFIGURATION-742:
--------------------------------------------
Summary: Dots in ini keys corrupts nodes structure
Key: CONFIGURATION-742
URL: https://issues.apache.org/jira/browse/CONFIGURATION-742
Project: Commons Configuration
Issue Type: Bug
Components: Expression engine
Affects Versions: 1.6
Reporter: Michal Grzybek
Example:
{noformat}
[dots_example]
...
# only key, no value on purpose {noformat}
Dots as key names are [considered as syntax
error|http://commons.apache.org/proper/commons-configuration/userguide/howto_hierarchical.html#Escaping_special_characters]
but no ConfigurationException is thrown and also this property is stored in
data structure as a node with key="..." and value=null.
This leads to problems:
{{configParser.getSection("dots_example").getRootNode().getChildren()}}
// returns Collection with one Node: "..."=null
{{configParser.getSection("dots_example").getKeys()}}
// returns List size=1 with "..." inside
but
{{configParser.getSection("dots_example").containsKey("...")}}
// return false
The result of inconsistent data structure is e.g. NPE when writing to file.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)