ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1143498 - /webservices/wss4j/trunk/src/main/java/org/apache/ws/security/WSDocInfo.java
Date Wed, 06 Jul 2011 16:49:46 GMT
Author: coheigea
Date: Wed Jul  6 16:49:46 2011
New Revision: 1143498

URL: http://svn.apache.org/viewvc?rev=1143498&view=rev
Log:
Adding a fix for a NPE.

Modified:
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/WSDocInfo.java

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/WSDocInfo.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/WSDocInfo.java?rev=1143498&r1=1143497&r2=1143498&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/WSDocInfo.java (original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/WSDocInfo.java Wed Jul  6
16:49:46 2011
@@ -54,7 +54,11 @@ public class WSDocInfo {
         // be that the "owner" document of any child elements is an internal Document, rather
         // than the SOAPPart. This is the case for the SUN SAAJ implementation.
         //
-        this.doc = doc.getDocumentElement().getOwnerDocument();
+        if (doc != null && doc.getDocumentElement() != null) {
+            this.doc = doc.getDocumentElement().getOwnerDocument();
+        } else {
+            this.doc = doc;
+        }
     }
     
     /**



Mime
View raw message