[
https://issues.apache.org/jira/browse/WSCOMMONS-229?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sanka Samaranayake resolved WSCOMMONS-229.
------------------------------------------
Resolution: Fixed
Fixed in revision 638954.
> OMNode.insertSiblingBefore(OMNode) fails if the parent of the argument is
> different
> -----------------------------------------------------------------------------------
>
> Key: WSCOMMONS-229
> URL: https://issues.apache.org/jira/browse/WSCOMMONS-229
> Project: WS-Commons
> Issue Type: Bug
> Components: AXIOM
> Environment: OS:
> ----
> Linux version 2.6.17-gentoo ([EMAIL PROTECTED]) (gcc version 3.3.5-20050130
> (Gentoo 3.3.5.20050130-r1, ssp-3.3.5.20050130-1, pie-8.7.7.1))
> JDK
> ----
> java version "1.5.0_08"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)
> Java HotSpot(TM) Client VM (build 1.5.0_08-b03, mixed mode, sharing)
> Reporter: Sanka Samaranayake
> Assignee: Sanka Samaranayake
> Attachments: WSCOMMONS-229_patch.txt
>
>
> Following snippet illustrates the defect:
> OMFactory fac = OMAbstractFactory.getOMFactory();
>
> OMElement root = fac.createOMElement(new QName("urn:root", "root",
> "root"));
> fac.createOMElement(new QName("urn:foo", "foo", "foo"), root);
>
> OMElement another = fac.createOMElement(new QName("urn:another",
> "another", "another"));
> OMElement bar = fac.createOMElement(new QName("urn:bar", "bar",
> "bar"), another);
>
> OMElement firstChild = root.getFirstElement();
> firstChild.insertSiblingBefore(bar);
>
> System.out.println(root);
> Result:
> <root:root xmlns:root="urn:root"><bar:bar
> xmlns:bar="urn:bar"></bar:bar></root:root>
> where it should have yeilded
> <root:root xmlns:root="urn:root"><bar:bar
> xmlns:bar="urn:bar"></bar:bar><foo:foo
> xmlns:foo="urn:foo"></foo:foo></root:root>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]