You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by co...@apache.org on 2011/07/06 18:49:46 UTC
svn commit: r1143498 -
/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/WSDocInfo.java
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;
+ }
}
/**