commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Heger (JIRA)" <>
Subject [jira] [Resolved] (CONFIGURATION-458) SubnodeConfiguration.clear() does not work correctly
Date Tue, 02 Aug 2011 20:18:27 GMT


Oliver Heger resolved CONFIGURATION-458.

       Resolution: Fixed
    Fix Version/s: 1.7

A fix was applied in revision 1153263.

> SubnodeConfiguration.clear() does not work correctly
> ----------------------------------------------------
>                 Key: CONFIGURATION-458
>                 URL:
>             Project: Commons Configuration
>          Issue Type: Bug
>    Affects Versions: 1.6
>            Reporter: Oliver Heger
>             Fix For: 1.7
> If clear() is called on a SubnodeConfiguration obtained through the configurationAt()
method of HierarchicalConfiguration, the node structure of the parent configuration (outside
of the area of the sub configuration) may also be manipulated. Properties added to the SubnodeConfiguration
after a clear() are not visible from the parent configuration.
> The problem is caused by the implementation of the clear() method inherited from AbstractConfiguration.
This will call clearProperty() for each property found in the configuration. clearProperty()
in turn clears the value of nodes and recursively clears the parent node if it does not contain
any data. Here the structure owned by the SubnodeConfiguration can be left so that the parent
gets manipulated.
> A possible solution would be to provide a specific implementation of clear() for hierarchical
configurations. This could also be more efficient than the base implementation.

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message