CAMEL-8462 Removed the field of request from HttpServerChannelHandler
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/44d92a6b Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/44d92a6b Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/44d92a6b Branch: refs/heads/camel-2.15.x Commit: 44d92a6b95fcaaaeb043824d78799d1098471923 Parents: 08aa7da Author: Willem Jiang <[email protected]> Authored: Mon Mar 9 18:06:32 2015 +0800 Committer: Willem Jiang <[email protected]> Committed: Mon Mar 9 18:36:46 2015 +0800 ---------------------------------------------------------------------- .../netty4/http/handlers/HttpServerChannelHandler.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/44d92a6b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/handlers/HttpServerChannelHandler.java ---------------------------------------------------------------------- diff --git a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/handlers/HttpServerChannelHandler.java b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/handlers/HttpServerChannelHandler.java index b459057..18770b1 100644 --- a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/handlers/HttpServerChannelHandler.java +++ b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/handlers/HttpServerChannelHandler.java @@ -61,7 +61,6 @@ public class HttpServerChannelHandler extends ServerChannelHandler { // use NettyHttpConsumer as logger to make it easier to read the logs as this is part of the consumer private static final Logger LOG = LoggerFactory.getLogger(NettyHttpConsumer.class); private final NettyHttpConsumer consumer; - private HttpRequest request; public HttpServerChannelHandler(NettyHttpConsumer consumer) { super(consumer); @@ -74,8 +73,7 @@ public class HttpServerChannelHandler extends ServerChannelHandler { @Override protected void channelRead0(ChannelHandlerContext ctx, Object msg) throws Exception { - // store request, as this channel handler is created per pipeline - request = (HttpRequest) msg; + HttpRequest request = (HttpRequest) msg; LOG.debug("Message received: {}", request); @@ -281,7 +279,7 @@ public class HttpServerChannelHandler extends ServerChannelHandler { @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { - + // only close if we are still allowed to run if (consumer.isRunAllowed()) {
