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] [Updated] (CAMEL-13941) NullPointerException when Conduit is null

     [ https://issues.apache.org/jira/browse/CAMEL-13941?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julien Greffe updated CAMEL-13941:
----------------------------------
    Description: 
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.

  was:
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.


> 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: Major
>
> 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)