You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by "Andreas Veithen (JIRA)" <ji...@apache.org> on 2008/12/16 14:02:44 UTC

[jira] Updated: (WSCOMMONS-337) insertSiblingAfter() method doesn't set last child

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

Andreas Veithen updated WSCOMMONS-337:
--------------------------------------

    Fix Version/s: Axiom 1.2.8

> insertSiblingAfter() method doesn't set last child
> --------------------------------------------------
>
>                 Key: WSCOMMONS-337
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-337
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>            Reporter: Saliya Ekanayake
>             Fix For: Axiom 1.2.8
>
>         Attachments: 20080702_fix.patch, 20080702_fix2.patch, insertSiblingAfter_patch.patch, insertSiblingAfter_withTest.patch
>
>
> The insertSiblingAfter() method of OMNodeImpl adds a sibling after the invoked node. If the parent of these nodes is an OMElement and the user invokes the addChild() method then the added sibling is replaced. Consider the following sample.
>   OMElement parent = fac.createOMElement("parent", null);
>   OMElement c1 = fac.createOMElement("c1", null);
>   OMElement c2 = fac.createOMElement("c2", null);
>   OMElement c3 = fac.createOMElement("c3", null);
>   parent.addChild(c1);
>   c1.insertSiblingAfter(c2);
>   parent.addChild(c3);
>  
>   System.out.println(parent);
> The correct output should be: <parent><c1 /><c2 /><c3 /></parent>
> But the we don't get the element c2. The incorrect output we get is : <parent><c1 /><c3 /></parent>

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