diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2012-03-23 13:02:44 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2012-03-23 13:02:44 +0000 |
commit | 0bc82d8baa98f2bf9055837a3bf9bfdaf1b91991 (patch) | |
tree | 7c3aba69c0d26d16700370b0026a28c8d2f38b4b /sca-java-2.x/trunk/modules/core | |
parent | 24419ba73dd90f8f99d7b6b611416a4e3f25e7f7 (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.java | 7 |
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()); |