You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Oliver Heger (JIRA)" <ji...@apache.org> on 2007/09/23 18:23:50 UTC

[jira] Resolved: (CONFIGURATION-296) XMLConfiguration and attributes on the root node

     [ https://issues.apache.org/jira/browse/CONFIGURATION-296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oliver Heger resolved CONFIGURATION-296.
----------------------------------------

    Resolution: Fixed

The problem was that the root node of a XMLConfiguration was not correctly initialized with a reference to the XML document's root element. So the value could be temporarily changed, but this change was not applied to the backing XML document. So it got lost when the configuration was saved.

This problem should be fixed now.

> XMLConfiguration and attributes on the root node
> ------------------------------------------------
>
>                 Key: CONFIGURATION-296
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-296
>             Project: Commons Configuration
>          Issue Type: Bug
>    Affects Versions: 1.4
>            Reporter: Oliver Heger
>            Assignee: Oliver Heger
>             Fix For: 1.5
>
>
> With XMLConfiguration it is not possible to change the value of an attribute of the root element.
> New attributes on the root level can be created, e.g.:
> XMLConfiguration config = new XMLConfiguration();
> config.addProperty("[@test]", "true");
> would create a new "test" attribute of the root element. However if this configuration is saved and loaded again, a
> config.setProperty("[@test]", "false");
> only temporarily changes the value: getProperty() returns the new value, but when the configuration is saved, the old value is written.

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