You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2019/09/04 17:32:36 UTC

[camel] branch camel-2.x updated: CAMEL-13941: avoid NullPointerException when Conduit is null

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-2.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-2.x by this push:
     new f61680d  CAMEL-13941: avoid NullPointerException when Conduit is null
f61680d is described below

commit f61680dfe34099673317c436ccf197bc9b310a6a
Author: Julien Greffe <jg...@talend.com>
AuthorDate: Wed Sep 4 17:44:26 2019 +0200

    CAMEL-13941: avoid NullPointerException when Conduit is null
---
 .../src/main/java/org/apache/camel/component/cxf/CxfProducer.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
index 3e02d69..df9e7e4 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
@@ -84,7 +84,7 @@ public class CxfProducer extends DefaultProducer implements AsyncProcessor {
             client = endpoint.createClient();
         }
         Conduit conduit = client.getConduit();
-        if (conduit.getClass().getName().endsWith("JMSConduit")) {
+        if (conduit != null && conduit.getClass().getName().endsWith("JMSConduit")) {
             java.lang.reflect.Method getJmsConfig = conduit.getClass().getMethod("getJmsConfig");
             Object jmsConfig = getJmsConfig.invoke(conduit);
             java.lang.reflect.Method getMessageType = jmsConfig.getClass().getMethod("getMessageType");