commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Heger (JIRA)" <>
Subject [jira] [Commented] (CONFIGURATION-670) Inconsistency with configurationAt method.
Date Sun, 27 Aug 2017 16:31:00 GMT


Oliver Heger commented on CONFIGURATION-670:

Thanks for your detailed input.

I think the problem lies in the implementation of _getNodeModel()_ in _SubnodeConfiguration_
which returns the model of the parent configuration and thus points to the original root node.
It does so because it does not have an _InMemoryNodeModel_ on its own which it could expose.
(And I have currently no idea how it could come to a correctly initialized model.)

Access to configuration properties work correctly because here the model returned by the _getModel()_
method is used. If you change your examples to replace _getNodeModel()_ by _getModel()_ they
should work. However, the problem here is that _getModel()_ is more for internal access and
does not use correct synchronization.

Not sure how to proceed. Normal usage of configuration objects works correctly, and all methods
do what is documented. Is the _getNodeModel()_ method in _SubnodeConfiguration_ important
for your implementation?

> Inconsistency with configurationAt method.
> ------------------------------------------
>                 Key: CONFIGURATION-670
>                 URL:
>             Project: Commons Configuration
>          Issue Type: Bug
>          Components: Expression engine
>    Affects Versions: 2.1.1
>            Reporter: Magno Nascimento de Azevedo Cruz
> After some testing, I found some inconsistency with the use of {{configurationAt()}},
to simplify it, this version is working correctly, returning the {{HierarchicalConfiguration}}
pointing to the right property:
> {code:java}
> config.configurationAt("property.indexedProperty(0)", false);
> {code}
> While this version, instead of returning a {{HierarchicalConfiguration}} with the root
tracking node pointing to {{indexedProperty(0)}}, it returns the tracking node pointing to
the root of the whole tree of properties.
> {code:java}
> config.configurationAt("property.indexedProperty(0)", true);
> {code}
> I'm trying to implement a support to a new format called [SURF|]
created by GlobalMentor, but I didn't override this method, so I think it's coming from the
original implementation.
> More informations may be found at [].

This message was sent by Atlassian JIRA

View raw message