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

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

commit dd814a1efe21ba3c51f60b90f2d8fe628f9de094
Author: Otavio Rodolfo Piske <[email protected]>
AuthorDate: Wed Jan 4 17:50:15 2023 +0100

    (chores) camel-http: avoid risky unboxing
---
 .../src/main/java/org/apache/camel/component/http/HttpProducer.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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 a2a2f7ef7e4..04aa2d8191d 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
@@ -483,7 +483,8 @@ public class HttpProducer extends DefaultProducer {
         Header header = 
httpResponse.getFirstHeader(HttpConstants.CONTENT_ENCODING);
         String contentEncoding = header != null ? header.getValue() : null;
 
-        if (!exchange.getProperty(Exchange.SKIP_GZIP_ENCODING, Boolean.FALSE, 
Boolean.class)) {
+        final boolean gzipEncoding = 
exchange.getProperty(Exchange.SKIP_GZIP_ENCODING, Boolean.FALSE, Boolean.class);
+        if (!gzipEncoding) {
             is = GZIPHelper.uncompressGzip(contentEncoding, is);
         }
         // Honor the character encoding

Reply via email to