Author: chinthaka
Date: Tue Sep 12 16:15:36 2006
New Revision: 442754

URL: http://svn.apache.org/viewvc?view=rev&rev=442754
Log:
Fix for http://issues.apache.org/jira/browse/WSCOMMONS-93 for DOOM

Modified:
    
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ChildNode.java

Modified: 
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ChildNode.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ChildNode.java?view=diff&rev=442754&r1=442753&r2=442754
==============================================================================
--- 
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ChildNode.java
 (original)
+++ 
webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/ChildNode.java
 Tue Sep 12 16:15:36 2006
@@ -147,6 +147,8 @@
 
         if (this.parentNode != null) {
             ((OMNodeEx) sibling).setParent(this.parentNode);
+        } else if(this == sibling){
+            throw new OMException("Inserting self as the sibling is not 
allowed");
         }
 
         if (sibling instanceof ChildNode) {
@@ -169,6 +171,9 @@
      */
     public void insertSiblingBefore(OMNode sibling) throws OMException {
         // ((OMNodeEx)sibling).setParent(this.parentNode);
+        if(this == sibling){
+            throw new OMException("Inserting self as the sibling is not 
allowed");
+        }
         if (sibling instanceof ChildNode) {
             // ChildNode domSibling = (ChildNode)sibling;
             // domSibling.nextSibling = this;



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to