summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/core
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2012-03-23 13:02:44 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2012-03-23 13:02:44 +0000
commit0bc82d8baa98f2bf9055837a3bf9bfdaf1b91991 (patch)
tree7c3aba69c0d26d16700370b0026a28c8d2f38b4b /sca-java-2.x/trunk/modules/core
parent24419ba73dd90f8f99d7b6b611416a4e3f25e7f7 (diff)
Avoid NPE when binding doesn't support callback
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1304325 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/core')
-rw-r--r--sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/CallbackServiceReferenceImpl.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/CallbackServiceReferenceImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/CallbackServiceReferenceImpl.java
index e65dd10808..4c206ec5db 100644
--- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/CallbackServiceReferenceImpl.java
+++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/CallbackServiceReferenceImpl.java
@@ -132,7 +132,12 @@ public class CallbackServiceReferenceImpl<B> extends ServiceReferenceImpl<B> {
// 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());