Author: dims
Date: Fri Oct 27 13:01:06 2006
New Revision: 468512

URL: http://svn.apache.org/viewvc?view=rev&rev=468512
Log:
Fix for WSCOMMONS-117 - NPE in OMDocumentImpl

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

Modified: 
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMDocumentImpl.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMDocumentImpl.java?view=diff&rev=468512&r1=468511&r2=468512
==============================================================================
--- 
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMDocumentImpl.java
 (original)
+++ 
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMDocumentImpl.java
 Fri Oct 27 13:01:06 2006
@@ -134,7 +134,7 @@
      * @return Returns OMElement.
      */
     public OMElement getOMDocumentElement() {
-        while (documentElement == null) {
+        while (documentElement == null && parserWrapper != null) {
             parserWrapper.next();
         }
         return documentElement;
@@ -173,8 +173,9 @@
      * Forces the parser to proceed, if parser has not yet finished with the 
XML input.
      */
     public void buildNext() {
-        if (!parserWrapper.isCompleted())
+        if (parserWrapper != null && !parserWrapper.isCompleted()) {
             parserWrapper.next();
+        }
     }
 
     /**



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

Reply via email to