cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r760178 - /cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/AbstractJAXWSMethodInvoker.java
Date Mon, 30 Mar 2009 21:15:24 GMT
Author: dkulp
Date: Mon Mar 30 21:15:23 2009
New Revision: 760178

URL: http://svn.apache.org/viewvc?rev=760178&view=rev
Log:
[CXF-2122] Fix potential NPE in the method invoker.   Fix from Richard Opalka applied.

Modified:
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/AbstractJAXWSMethodInvoker.java

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/AbstractJAXWSMethodInvoker.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/AbstractJAXWSMethodInvoker.java?rev=760178&r1=760177&r2=760178&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/AbstractJAXWSMethodInvoker.java
(original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/AbstractJAXWSMethodInvoker.java
Mon Mar 30 21:15:23 2009
@@ -127,9 +127,11 @@
             List list = (List) ctx.get(Header.HEADER_LIST);
             if (list != null && !list.isEmpty()) {
                 SoapMessage sm = (SoapMessage) createResponseMessage(exchange);
-                Iterator iter = list.iterator();
-                while (iter.hasNext()) {
-                    sm.getHeaders().add((Header) iter.next());
+                if (sm != null) {
+                    Iterator iter = list.iterator();
+                    while (iter.hasNext()) {
+                        sm.getHeaders().add((Header) iter.next());
+                    }
                 }
             }
         }



Mime
View raw message