You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "jo desmet (JIRA)" <ji...@apache.org> on 2011/04/07 08:09:05 UTC

[jira] [Commented] (CONFIGURATION-445) XMLConfiguration save gives wrong xml when it contains combined elements (viewNode) with attributes

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

jo desmet commented on CONFIGURATION-445:
-----------------------------------------

I tried to debug to get more info : it seems that the issue is linke to the following : 
In the hierarchicalConfiguration$Node.visit the visitBeforeChildren is called on the visitor. This visitor sets the references of the nodes correctly. Except when the node concerned is a viewnode, it creates a new Node based on this. When coming back to the visit afterwards, logic continues based on the children which still contain the viewnode and thus the wrong or absent reference. I currently have not enough knowledge of the code to understand how this best should work.

tnx

Jo

> XMLConfiguration save gives wrong xml when it contains combined elements (viewNode) with attributes
> ---------------------------------------------------------------------------------------------------
>
>                 Key: CONFIGURATION-445
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-445
>             Project: Commons Configuration
>          Issue Type: Bug
>            Reporter: jo desmet
>         Attachments: AttributeTest.java, component1.xml, component1_spec.xml
>
>
> when creating a CombinedConfiguration with an overridecombiner I get into trouble when I need to generate a xml file from te resulting view. It seems that the viewNodes which are created do not handle the parent of the attributes correctly. 
> So when saving this configuration the attributes get lost and attached to the rootnode.
> I made a unit test and will attach the following files :
> - component1.xml
> - component1_spec.xml
> - AttributeTest.java
> - log output

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira