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/18 14:14:30 UTC

[camel] branch master updated: CAMEL-16233: Fix camel-http - Optimize to avoid type convertion that would do deep checking.

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 48dc393  CAMEL-16233: Fix camel-http - Optimize to avoid type convertion that would do deep checking.
48dc393 is described below

commit 48dc39361b45e0a50260c4bda324e2f6d3cb58f0
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Feb 18 15:13:58 2021 +0100

    CAMEL-16233: Fix camel-http - Optimize to avoid type convertion that would do deep checking.
---
 .../src/main/java/org/apache/camel/component/http/HttpProducer.java     | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
index af521da..fdf99c8 100644
--- a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
+++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
@@ -623,6 +623,8 @@ public class HttpProducer extends DefaultProducer {
         try {
             if (body == null) {
                 return null;
+            } else if (body instanceof HttpEntity) {
+                answer = (HttpEntity) body;
                 // special optimized for using these 3 type converters for common message payload types
             } else if (body instanceof byte[]) {
                 answer = HttpEntityConverter.toHttpEntity((byte[]) body, exchange);