Author: dkulp
Date: Mon Oct 25 21:17:52 2010
New Revision: 1027274

URL: http://svn.apache.org/viewvc?rev=1027274&view=rev
Log:
Add an NPE guard to the OneWayProcessor.

Modified:
    
cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java

Modified: 
cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java?rev=1027274&r1=1027273&r2=1027274&view=diff
==============================================================================
--- 
cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java
 (original)
+++ 
cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OneWayProcessorInterceptor.java
 Mon Oct 25 21:17:52 2010
@@ -86,8 +86,12 @@ public class OneWayProcessorInterceptor 
                 partial.setExchange(message.getExchange());
                 Conduit conduit = message.getExchange().getDestination()
                     .getBackChannel(message, null, null);
-                conduit.prepare(partial);
-                conduit.close(partial);
+                if (conduit != null) {
+                    //for a one-way, the back channel could be
+                    //null if it knows it cannot send anything.
+                    conduit.prepare(partial);
+                    conduit.close(partial);
+                }
             } catch (IOException e) {
                 //IGNORE
             }


Reply via email to