You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Julien Greffe (Jira)" <ji...@apache.org> on 2019/09/04 13:25:00 UTC

[jira] [Created] (CAMEL-13941) NullPointerException when Conduit is null

Julien Greffe created CAMEL-13941:
-------------------------------------

             Summary: 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.24.1, 2.23.1, 2.21.2, 2.20.1
            Reporter: Julien Greffe


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)