[ 
https://issues.apache.org/jira/browse/WSCOMMONS-513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12795966#action_12795966
 ] 

Andreas Veithen commented on WSCOMMONS-513:
-------------------------------------------

The right behavior should be to throw an exception, i.e. DOOM should be 
modified to behave in the same way as LLOM.

Rationale: Assume that a node would be allowed to have a sibling without having 
a parent. The siblings can only be serialized (together) if they are added to a 
document. Since adding a node to document necessarily removes the existing 
sibling relationship, it doesn't make sense to allow the creation of the 
sibling relationship in the first place.

> Behavior of insertSiblingAfter and insertSiblingBefore is not well defined 
> for orphan nodes
> -------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-513
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-513
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>    Affects Versions: Axiom 1.2.8
>            Reporter: Andreas Veithen
>            Assignee: Andreas Veithen
>            Priority: Minor
>             Fix For: Axiom 1.2.9
>
>
> The behavior of OMNode#insertSiblingAfter and OMNode#insertSiblingBefore is 
> not well defined if the node has no parent:
> - LLOM: throws OMException ("Parent can not be null").
> - DOOM in Axiom < 1.2.8: silently accepts the call.
> - DOOM in Axiom 1.2.8: throws NPE (see AXIS2-4514).
> The behavior needs to be clearly specified and made consistent between LLOM 
> and DOOM.

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

Reply via email to