commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralph Goers (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CONFIGURATION-401) HierarchicalConfiguration does not support hierarchy from property files
Date Wed, 11 Nov 2009 07:54:39 GMT

    [ https://issues.apache.org/jira/browse/CONFIGURATION-401?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12776348#action_12776348
] 

Ralph Goers commented on CONFIGURATION-401:
-------------------------------------------

At this point I find myself wondering why you wouldn't just use XML?  The above is just ugly.
Especially when I can just do:

<persons>
  <group name="admin">
    <person name="x"/>
    <person name="y"/>
  </group>
  <group name="users">
    <person name="z"/>
  </group>
</persons>

and then have an XML Schema to enforce it to boot.

But if for some reason you have an aversion to XML than you could invent some new format that
extends AbstractHierarchicalFileConfiguration.

> HierarchicalConfiguration does not support hierarchy  from property files
> -------------------------------------------------------------------------
>
>                 Key: CONFIGURATION-401
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-401
>             Project: Commons Configuration
>          Issue Type: Bug
>          Components: Expression engine
>    Affects Versions: 1.6
>         Environment: windows/Linux
>            Reporter: yair ogen
>
> If you have hierarchy like this:
> persons.person.name=1
> persons.person.surName=2
> persons.person.phoneNum=3
> persons.person.name=4
> persons.person.surName=5
> persons.person.phoneNum=6
> persons.person.name=7
> persons.person.surName=8
> persons.person.phoneNum=9
> If I have a regular property configuration that loaded a file containing in the above.
then I transform into HierarchicalConfiguration  using: ConfigurationUtils.convertToHierarchical(configuration).
> The tree is not right.
> I can do this:
> hierarchicalConfiguration.subset("persons").subset("person(0)").getKeys()
> but this returned empty iterator:
> hierarchicalConfiguration.subset("persons").subset("person(1)").getKeys()
> Only the first person is available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message