tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r655365 - /incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/CallbackReferenceImpl.java
Date Sun, 11 May 2008 20:01:59 GMT
Author: nash
Date: Sun May 11 13:01:59 2008
New Revision: 655365

URL: http://svn.apache.org/viewvc?rev=655365&view=rev
Log:
Update to fix for TUSCANY-2306 to avoid creating a CallbackReferenceImpl object when not needed

Modified:
    incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/CallbackReferenceImpl.java

Modified: incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/CallbackReferenceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/CallbackReferenceImpl.java?rev=655365&r1=655364&r2=655365&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/CallbackReferenceImpl.java
(original)
+++ incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/CallbackReferenceImpl.java
Sun May 11 13:01:59 2008
@@ -46,8 +46,11 @@
     public static CallbackReferenceImpl newInstance(Class interfaze,
                                                     ProxyFactory proxyFactory,
                                                     List<RuntimeWire> wires) {
-        CallbackReferenceImpl ref = new CallbackReferenceImpl(interfaze, proxyFactory, wires);
-        return ref.getResolvedEndpoint() != null ? ref : null;
+        if (getCallbackEndpoint(ThreadMessageContext.getMessageContext()) != null) {
+            return new CallbackReferenceImpl(interfaze, proxyFactory, wires);
+        } else {
+            return null;
+        }
     }
 
     private CallbackReferenceImpl(Class<B> interfaze, ProxyFactory proxyFactory, List<RuntimeWire>
wires) {



Mime
View raw message