You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2021/02/03 07:59:21 UTC

[camel] 01/03: Polished

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-3.7.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit d8dadf89260d98ad8738032bed27402f28f5507d
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Feb 3 06:17:37 2021 +0100

    Polished
---
 .../org/apache/camel/component/vertx/http/VertxHttpProducer.java    | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/components/camel-vertx-http/src/main/java/org/apache/camel/component/vertx/http/VertxHttpProducer.java b/components/camel-vertx-http/src/main/java/org/apache/camel/component/vertx/http/VertxHttpProducer.java
index b7360cd..51e7412 100644
--- a/components/camel-vertx-http/src/main/java/org/apache/camel/component/vertx/http/VertxHttpProducer.java
+++ b/components/camel-vertx-http/src/main/java/org/apache/camel/component/vertx/http/VertxHttpProducer.java
@@ -32,7 +32,6 @@ import org.apache.camel.AsyncCallback;
 import org.apache.camel.CamelExchangeException;
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
-import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.support.DefaultAsyncProducer;
 import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.util.URISupport;
@@ -57,11 +56,10 @@ public class VertxHttpProducer extends DefaultAsyncProducer {
 
     @Override
     public boolean process(Exchange exchange, AsyncCallback callback) {
-        VertxHttpConfiguration configuration = getEndpoint().getConfiguration();
         Message message = exchange.getMessage();
 
         try {
-            VertxHttpBinding vertxHttpBinding = configuration.getVertxHttpBinding();
+            VertxHttpBinding vertxHttpBinding = getEndpoint().getConfiguration().getVertxHttpBinding();
             HttpRequest<Buffer> request = vertxHttpBinding.prepareHttpRequest(getEndpoint(), exchange);
             Handler<AsyncResult<HttpResponse<Buffer>>> resultHandler = createResultHandler(exchange, callback);
 
@@ -132,7 +130,7 @@ public class VertxHttpProducer extends DefaultAsyncProducer {
                 VertxHttpBinding vertxHttpBinding = endpoint.getConfiguration().getVertxHttpBinding();
                 vertxHttpBinding.handleResponse(endpoint, exchange, response);
             } catch (Exception e) {
-                throw new RuntimeCamelException(e);
+                exchange.setException(e);
             } finally {
                 callback.done(false);
             }