cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [2/3] cxf git commit: [CXF-6092] Add a couple NPE guards
Date Fri, 07 Nov 2014 18:54:48 GMT
[CXF-6092] Add a couple NPE guards


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/8f12a150
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/8f12a150
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/8f12a150

Branch: refs/heads/master
Commit: 8f12a150b8902c59a96d7cde90ac833628aa0dd8
Parents: 7845fa8
Author: Daniel Kulp <dkulp@apache.org>
Authored: Fri Nov 7 13:25:52 2014 -0500
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Fri Nov 7 13:54:35 2014 -0500

----------------------------------------------------------------------
 core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/8f12a150/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java b/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
index 9114c66..775170c 100644
--- a/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
+++ b/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
@@ -325,7 +325,9 @@ public class ClientImpl
         try {
             return invoke(oi, params, context, exchange);
         } finally {
-            responseContext.put(Thread.currentThread(), resp);
+            if (responseContext != null) {
+                responseContext.put(Thread.currentThread(), resp);
+            }
         }
     }
     public Object[] invoke(BindingOperationInfo oi,
@@ -336,7 +338,7 @@ public class ClientImpl
         } finally {
             if (context != null) {
                 Map<String, Object> resp = CastUtils.cast((Map<?, ?>)context.get(RESPONSE_CONTEXT));
-                if (resp != null) {
+                if (resp != null && responseContext != null) {
                     responseContext.put(Thread.currentThread(), resp);
                 }
             }
@@ -811,7 +813,7 @@ public class ClientImpl
                                                                 .getOutMessage()
                                                                 .get(Message.INVOCATION_CONTEXT));
                 resCtx = CastUtils.cast((Map<?, ?>)resCtx.get(RESPONSE_CONTEXT));
-                if (resCtx != null) {
+                if (resCtx != null && responseContext != null) {
                     responseContext.put(Thread.currentThread(), resCtx);
                 }
                 try {


Mime
View raw message