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

ClassNotFoundException may silently be ignored in InProducer

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.18.3
    • Fix Version/s: 2.17.7, 2.18.4, 2.19.0
    • Component/s: camel-core
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      ProducerCache.doInProducer() may be called with null exchange.

      The javadoc says

          /**
           * Sends an exchange to an endpoint using a supplied callback, using the synchronous processing.
           * <p/>
           * If an exception was thrown during processing, it would be set on the given Exchange
           *
           * @param endpoint  the endpoint to send the exchange to
           * @param exchange  the exchange, can be <tt>null</tt> if so then create a new exchange from the producer
           * @param pattern   the exchange pattern, can be <tt>null</tt>
           * @param callback  the callback
           * @return the response from the callback
           * @see #doInAsyncProducer(org.apache.camel.Endpoint, org.apache.camel.Exchange, org.apache.camel.ExchangePattern, org.apache.camel.AsyncCallback, org.apache.camel.AsyncProducerCallback)
           */
          public <T> T doInProducer(Endpoint endpoint, Exchange exchange, ExchangePattern pattern, ProducerCallback<T> callback) {
      

      The exchange is however never created, which may result in a null return from ProducerTemplate and a possible exception silently being ignored.

        Attachments

          Activity

            People

            • Assignee:
              tdiesler Thomas Diesler
              Reporter:
              tdiesler Thomas Diesler
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: