Author: ningjiang
Date: Tue Oct 19 11:05:46 2010
New Revision: 1024201

URL: http://svn.apache.org/viewvc?rev=1024201&view=rev
Log:
CAMEL-3252 Fixed the NPE log fo the DefaultConsumerTemplate

Modified:
    
camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultConsumerTemplate.java

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultConsumerTemplate.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultConsumerTemplate.java?rev=1024201&r1=1024200&r2=1024201&view=diff
==============================================================================
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultConsumerTemplate.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultConsumerTemplate.java
 Tue Oct 19 11:05:46 2010
@@ -226,6 +226,10 @@ public class DefaultConsumerTemplate ext
 
     private static void doneUoW(Exchange exchange) {
         try {
+            // The receiveBody method will get a null exchange
+            if (exchange == null) {
+                return;
+            }
             if (exchange.getUnitOfWork() == null) {
                 // handover completions and done them manually to ensure they 
are being executed
                 List<Synchronization> synchronizations = 
exchange.handoverCompletions();


Reply via email to