You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2022/03/08 11:14:31 UTC
[camel] 06/11: CAMEL-15520: fixed deprecations in camel-netty-http
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 015216c025387c615ca58446d6ea5c42f04103b2
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Tue Mar 8 10:27:24 2022 +0100
CAMEL-15520: fixed deprecations in camel-netty-http
---
.../org/apache/camel/component/netty/http/NettyHttpConverter.java | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConverter.java b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConverter.java
index 4ee919f..5ffba22 100644
--- a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConverter.java
+++ b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConverter.java
@@ -49,12 +49,8 @@ public final class NettyHttpConverter {
// okay we may need to cheat a bit when we want to grab the HttpRequest as its stored on the NettyHttpMessage
// so if the message instance is a NettyHttpMessage and its body is the value, then we can grab the
// HttpRequest from the NettyHttpMessage
- NettyHttpMessage msg;
- if (exchange.hasOut()) {
- msg = exchange.getOut(NettyHttpMessage.class);
- } else {
- msg = exchange.getIn(NettyHttpMessage.class);
- }
+ NettyHttpMessage msg = exchange.getMessage(NettyHttpMessage.class);
+
if (msg != null && msg.getBody() == value) {
// ensure the http request content is reset so we can read all the content out-of-the-box
FullHttpRequest request = msg.getHttpRequest();