You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by di...@apache.org on 2006/10/27 22:01:07 UTC
svn commit: r468512 -
/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMDocumentImpl.java
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: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org