Repository: camel
Updated Branches:
  refs/heads/master 3a68f1242 -> dbd6b584e


CAMEL-8694: java.lang.NullPointerException in at 
org.apache.camel.component.netty4.http.NettyHttpProducer.done


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/dbd6b584
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/dbd6b584
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/dbd6b584

Branch: refs/heads/master
Commit: dbd6b584e02f5ce0ae46e50d2f4ee6a2785dd7d4
Parents: 3a68f12
Author: Christian Mueller <cmuel...@apache.org>
Authored: Fri Apr 24 23:26:18 2015 +0200
Committer: Christian Mueller <cmuel...@apache.org>
Committed: Fri Apr 24 23:26:18 2015 +0200

----------------------------------------------------------------------
 .../org/apache/camel/component/netty4/http/NettyHttpProducer.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/dbd6b584/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpProducer.java
----------------------------------------------------------------------
diff --git 
a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpProducer.java
 
b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpProducer.java
index c021494..f88b0b2 100644
--- 
a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpProducer.java
+++ 
b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpProducer.java
@@ -95,8 +95,8 @@ public class NettyHttpProducer extends NettyProducer {
                     FullHttpResponse response = nettyMessage.getHttpResponse();
                     // Need to retain the ByteBuffer for producer to consumer
                     // TODO Remove this part of ByteBuffer right away
-                    response.content().retain();
                     if (response != null) {
+                        response.content().retain();
                         // the actual url is stored on the IN message in the 
getRequestBody method as its accessed on-demand
                         String actualUrl = 
exchange.getIn().getHeader(Exchange.HTTP_URL, String.class);
                         int code = response.getStatus() != null ? 
response.getStatus().code() : -1;
@@ -116,5 +116,4 @@ public class NettyHttpProducer extends NettyProducer {
             }
         }
     }
-
 }

Reply via email to