This is an automated email from the ASF dual-hosted git repository. siano pushed a commit to branch camel-2.24.x in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-2.24.x by this push: new a1ba128 CAMEL-14058 NPE for one-way requests with cookie handling a1ba128 is described below commit a1ba1280d6dc0447085555caf952d0874f976f74 Author: Stephan Siano <stephan.si...@sap.com> AuthorDate: Fri Oct 11 14:27:12 2019 +0200 CAMEL-14058 NPE for one-way requests with cookie handling --- .../main/java/org/apache/camel/component/cxf/CxfClientCallback.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfClientCallback.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfClientCallback.java index b2810c5..66e549b 100644 --- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfClientCallback.java +++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfClientCallback.java @@ -57,7 +57,7 @@ public class CxfClientCallback extends ClientCallback { super.handleResponse(ctx, res); } finally { // add cookies to the cookie store - if (endpoint.getCookieHandler() != null) { + if (endpoint.getCookieHandler() != null && cxfExchange.getInMessage() != null) { try { Map<String, List<String>> cxfHeaders = CastUtils.cast((Map<?, ?>)cxfExchange.getInMessage().get(Message.PROTOCOL_HEADERS)); endpoint.getCookieHandler().storeCookies(camelExchange, endpoint.getRequestUri(camelExchange), cxfHeaders); @@ -98,7 +98,7 @@ public class CxfClientCallback extends ClientCallback { } } finally { // add cookies to the cookie store - if (endpoint.getCookieHandler() != null) { + if (endpoint.getCookieHandler() != null && cxfExchange.getInMessage() != null) { try { Map<String, List<String>> cxfHeaders = CastUtils.cast((Map<?, ?>)cxfExchange.getInMessage().get(Message.PROTOCOL_HEADERS)); endpoint.getCookieHandler().storeCookies(camelExchange, endpoint.getRequestUri(camelExchange), cxfHeaders);