commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Heger (JIRA)" <>
Subject [jira] [Commented] (CONFIGURATION-623) Treat hierarchy delimiter equivalent to hierarchy instead of escaping
Date Sat, 16 Apr 2016 15:16:25 GMT


Oliver Heger commented on CONFIGURATION-623:

I am not sure about this proposal for various reasons:
* Implementing this feature would increase the complexity of configurations, especially for
the read and write methods.
* Multiple configuration classes would be affected, not only INIConfiguration. Keys with separators
could also appear for instance in XMLConfiguration, and I guess that all configurations should
be treated the same way in this respect.
* The internal representation of configuration data would differ from the physical structure
in the configuration file. This might cause unexpected problems.
* In order to be compatible with existing code, the feature must be configurable and disabled
per default.
* The separator character is a special property of the expression engine. For the XPathExpression
engine for instance, the handling is different. However, the implementation in the configuration
must be aware of it.

Compared to this concerns I think the potential benefit is rather small. That said, if somebody
comes up with a good implementation idea, I would be happy to review patches.

> Treat hierarchy delimiter equivalent to hierarchy instead of escaping
> ---------------------------------------------------------------------
>                 Key: CONFIGURATION-623
>                 URL:
>             Project: Commons Configuration
>          Issue Type: Wish
>          Components: Expression engine
>    Affects Versions: 2.0
>            Reporter: Simon Bin
> It would be nice if the . character could work as a hierarchy introducer, in such a way
that those files
> [learningtask]
> trains.lp = 5
> [learningtask.trains]
> lp = 7
> could be queried with config.getList(String.class, "learningtask.trains.lp");
> (note, at the moment you need to use the escaped form and will only get one or the other:
"learningtask..trains.lp" or "learningtask.trains..lp"

This message was sent by Atlassian JIRA

View raw message