Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-13941

NullPointerException when Conduit is null

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.20.1, 2.21.2, 2.23.1, 2.24.1
    • Fix Version/s: 2.23.4, 2.24.2, 2.25.0
    • Component/s: camel-cxf
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      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?

      Conduit conduit = client.getConduit();
      
              if (conduit.getClass().getName().endsWith("JMSConduit")) {
      ...
      }

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                davsclaus Claus Ibsen
                Reporter:
                jgreffe Julien Greffe
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m