[ 
https://issues.apache.org/jira/browse/CAMEL-13941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16922568#comment-16922568
 ] 

Claus Ibsen commented on CAMEL-13941:
-------------------------------------

But how can it be null, how and what do you do since you get a null ?

> NullPointerException when Conduit is null
> -----------------------------------------
>
>                 Key: CAMEL-13941
>                 URL: https://issues.apache.org/jira/browse/CAMEL-13941
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.20.1, 2.21.2, 2.23.1, 2.24.1
>            Reporter: Julien Greffe
>            Priority: Minor
>
> Hello,
> the CxfProducer.doStart() retrieves a Conduit.
> If this Conduit is null, should we still throw a NullPointerException or, 
> should we check nullity before condition?
> {code:java}
> Conduit conduit = client.getConduit();
>         if (conduit.getClass().getName().endsWith("JMSConduit")) {
> ...
> }{code}
> https://github.com/apache/camel/blob/camel-2.21.2/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java#L87
> https://github.com/apache/camel/blob/camel-2.23.1/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java#L87
> https://github.com/apache/camel/blob/camel-2.24.1/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java#L87
> Thanks for your point of view.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to