axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chinth...@apache.org
Subject svn commit: r326452 - /webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMElementImpl.java
Date Wed, 19 Oct 2005 08:09:31 GMT
Author: chinthaka
Date: Wed Oct 19 01:09:23 2005
New Revision: 326452

URL: http://svn.apache.org/viewcvs?rev=326452&view=rev
Log:
Fixing a small bug in OM. If the OM structure was created programmatically and if we try to
get a pull parser out of it, there was a NPE. Fixed that.

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

Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMElementImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMElementImpl.java?rev=326452&r1=326451&r2=326452&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMElementImpl.java
(original)
+++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMElementImpl.java
Wed Oct 19 01:09:23 2005
@@ -16,16 +16,7 @@
 
 package org.apache.axis2.om.impl.llom;
 
-import org.apache.axis2.om.OMAbstractFactory;
-import org.apache.axis2.om.OMAttribute;
-import org.apache.axis2.om.OMConstants;
-import org.apache.axis2.om.OMContainer;
-import org.apache.axis2.om.OMElement;
-import org.apache.axis2.om.OMException;
-import org.apache.axis2.om.OMNamespace;
-import org.apache.axis2.om.OMNode;
-import org.apache.axis2.om.OMText;
-import org.apache.axis2.om.OMXMLParserWrapper;
+import org.apache.axis2.om.*;
 import org.apache.axis2.om.impl.OMContainerEx;
 import org.apache.axis2.om.impl.OMNodeEx;
 import org.apache.axis2.om.impl.OMOutputImpl;
@@ -37,13 +28,12 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import java.io.ByteArrayOutputStream;
-import java.util.HashMap;
-import java.util.Iterator;
-
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
+import java.io.ByteArrayOutputStream;
+import java.util.HashMap;
+import java.util.Iterator;
 
 /**
  * Class OMElementImpl
@@ -563,7 +553,7 @@
             throw new UnsupportedOperationException(
                     "This element was not created in a manner to be switched");
         }
-        if (builder.isCompleted() && !cache) {
+        if (builder != null && builder.isCompleted() && !cache) {
             throw new UnsupportedOperationException(
                     "The parser is already consumed!");
         }



Mime
View raw message