cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1072196 - /cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java
Date Fri, 18 Feb 2011 23:42:16 GMT
Author: dkulp
Date: Fri Feb 18 23:42:16 2011
New Revision: 1072196

URL: http://svn.apache.org/viewvc?rev=1072196&view=rev
Log:
[CXF-3349] Fix possible NPE in WS-RM scenarios
Patch suggestion from Aki Yoshida applied

Modified:
    cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java

Modified: cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java?rev=1072196&r1=1072195&r2=1072196&view=diff
==============================================================================
--- cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java (original)
+++ cxf/trunk/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/ContextUtils.java Fri
Feb 18 23:42:16 2011
@@ -360,7 +360,7 @@ public final class ContextUtils {
      * @param inMAPs the inbound MAPs
      * @param inMessage the current message
      */
-    public static void rebaseResponse(final EndpointReferenceType reference,
+    public static void rebaseResponse(EndpointReferenceType reference,
                                       AddressingProperties inMAPs,
                                       final Message inMessage) {
         
@@ -382,12 +382,13 @@ public final class ContextUtils {
             }
             
             try {
+                if (reference == null) {
+                    reference = ContextUtils.getNoneEndpointReference();
+                }
                 exchange.setOutMessage(partialResponse);
                 Conduit backChannel = target.getBackChannel(inMessage,
                                                             partialResponse,
-                                                            reference == null
-                                                            ? ContextUtils.getNoneEndpointReference()
-                                                            : reference);
+                                                            reference);
 
                 if (backChannel != null) {
                     // set up interceptor chains and send message
@@ -419,7 +420,8 @@ public final class ContextUtils {
                     exchange.setOutMessage(fullResponse);
                     
                     Destination destination = createDecoupledDestination(
-                        exchange, reference);
+                        exchange, 
+                        reference);
                     exchange.setDestination(destination);
                          
                     



Mime
View raw message