tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sl...@apache.org
Subject svn commit: r1304325 - /tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/CallbackServiceReferenceImpl.java
Date Fri, 23 Mar 2012 13:02:44 GMT
Author: slaws
Date: Fri Mar 23 13:02:44 2012
New Revision: 1304325

URL: http://svn.apache.org/viewvc?rev=1304325&view=rev
Log:
Avoid NPE when binding doesn't support callback

Modified:
    tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/CallbackServiceReferenceImpl.java

Modified: tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/CallbackServiceReferenceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/CallbackServiceReferenceImpl.java?rev=1304325&r1=1304324&r2=1304325&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/CallbackServiceReferenceImpl.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/CallbackServiceReferenceImpl.java
Fri Mar 23 13:02:44 2012
@@ -132,7 +132,12 @@ public class CallbackServiceReferenceImp
         // to model the callback URI. With these changes the binding can just set a CallbackHandler
         // in the forward message to get the same effect. Some bindings don't do that hence
         // the various checks
-        this.resolvedEndpoint = msgContext.getFrom().getCallbackEndpoint();
+        this.resolvedEndpoint = null;
+        
+        if (msgContext.getFrom() != null){
+            resolvedEndpoint = msgContext.getFrom().getCallbackEndpoint();
+        }
+        
         if (resolvedEndpoint != null){
             if (resolvedEndpoint.getBinding() == null){
                 this.callbackHandler = new CallbackHandler(resolvedEndpoint.getURI());



Mime
View raw message