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 44e139333aed5324badc83236712d2b132839118 Author: Otavio Rodolfo Piske <angusyo...@gmail.com> AuthorDate: Tue Nov 22 18:35:24 2022 +0100 CAMEL-15105: adapt DefaultNettyHttpBinding to the new extension interface --- .../apache/camel/component/netty/http/DefaultNettyHttpBinding.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/DefaultNettyHttpBinding.java b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/DefaultNettyHttpBinding.java index b1e949593ab..4d8fbd93b7a 100644 --- a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/DefaultNettyHttpBinding.java +++ b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/DefaultNettyHttpBinding.java @@ -46,7 +46,6 @@ import io.netty.handler.codec.http.HttpResponseStatus; import io.netty.handler.codec.http.HttpVersion; import io.netty.util.ReferenceCountUtil; import org.apache.camel.Exchange; -import org.apache.camel.ExtendedExchange; import org.apache.camel.Message; import org.apache.camel.RuntimeCamelException; import org.apache.camel.TypeConverter; @@ -104,7 +103,7 @@ public class DefaultNettyHttpBinding implements NettyHttpBinding, Cloneable { // for proxy use case pass the request body buffer directly to the response to avoid additional processing // we need to retain it so that the request can be released and we can keep the content answer.setBody(request.content().retain()); - answer.getExchange().adapt(ExtendedExchange.class).setStreamCacheDisabled(true); + answer.getExchange().getExchangeExtension().setStreamCacheDisabled(true); exchange.getExchangeExtension().addOnCompletion(new SynchronizationAdapter() { @Override public void onDone(Exchange exchange) { @@ -337,7 +336,7 @@ public class DefaultNettyHttpBinding implements NettyHttpBinding, Cloneable { // keep the body as is, and use type converters answer.setBody(response.content()); // turn off stream cache as we use the raw body as-is - answer.getExchange().adapt(ExtendedExchange.class).setStreamCacheDisabled(true); + answer.getExchange().getExchangeExtension().setStreamCacheDisabled(true); } else { // stores as byte array as the netty ByteBuf will be freed when the producer is done, and then we can no longer access the message body response.retain();