axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chinth...@apache.org
Subject svn commit: r360044 - /webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMNodeImpl.java
Date Fri, 30 Dec 2005 09:15:46 GMT
Author: chinthaka
Date: Fri Dec 30 01:15:38 2005
New Revision: 360044

URL: http://svn.apache.org/viewcvs?rev=360044&view=rev
Log:
Fixing the insertSiblingBefore method.

Modified:
    webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMNodeImpl.java

Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMNodeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMNodeImpl.java?rev=360044&r1=360043&r2=360044&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMNodeImpl.java
(original)
+++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMNodeImpl.java
Fri Dec 30 01:15:38 2005
@@ -19,15 +19,15 @@
 import org.apache.axis2.om.OMContainer;
 import org.apache.axis2.om.OMException;
 import org.apache.axis2.om.OMNode;
-import org.apache.axis2.om.OMXMLParserWrapper;
 import org.apache.axis2.om.OMOutputFormat;
+import org.apache.axis2.om.OMXMLParserWrapper;
 import org.apache.axis2.om.impl.OMContainerEx;
 import org.apache.axis2.om.impl.OMNodeEx;
 import org.apache.axis2.om.impl.OMOutputImpl;
 
+import javax.xml.stream.XMLOutputFactory;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamWriter;
-import javax.xml.stream.XMLOutputFactory;
 import java.io.OutputStream;
 import java.io.Writer;
 
@@ -223,17 +223,19 @@
         if (parent == null) {
             throw new OMException();
         }
-        ((OMNodeEx)sibling).setParent(parent);
         if (sibling instanceof OMNodeImpl) {
             OMNodeImpl siblingImpl = (OMNodeImpl) sibling;
-            siblingImpl.setPreviousOMSibling(previousSibling);
-            siblingImpl.setNextOMSibling(this);
+            siblingImpl.nextSibling = this;
             if (previousSibling == null) {
                 parent.setFirstChild(siblingImpl);
+                siblingImpl.previousSibling = null;
             } else {
+                siblingImpl.setParent(parent);
                 previousSibling.setNextOMSibling(siblingImpl);
+                siblingImpl.setPreviousOMSibling(previousSibling);
             }
             previousSibling = siblingImpl;
+
         }
     }
 



Mime
View raw message