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:42:21 UTC
[camel] 01/02: 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.24.x
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 099af46a451ad6ca1a76416a14d9f1a2b788811f
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");