axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davidills...@apache.org
Subject svn commit: r478120 - /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java
Date Wed, 22 Nov 2006 10:42:18 GMT
Author: davidillsley
Date: Wed Nov 22 02:42:17 2006
New Revision: 478120

URL: http://svn.apache.org/viewvc?view=rev&rev=478120
Log:
Prevent NPE from isHeaderPresent if no envelope associated
with the MessageContext. (e.g. if the server 500's with no
envelope).

Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java?view=diff&rev=478120&r1=478119&r2=478120
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java
Wed Nov 22 02:42:17 2006
@@ -1149,6 +1149,10 @@
      * @return boolean
      */
     public boolean isHeaderPresent() {
+        // If there's no envelope there can't be a header.
+        if(this.envelope == null){
+            return false;
+        }
         OMElement node = this.envelope.getFirstElement();
         if (node == null) {
             return false;



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message