Author: rfeng
Date: Fri Jul 16 23:25:36 2010
New Revision: 964980

URL: http://svn.apache.org/viewvc?rev=964980&view=rev
Log:
Fix the regression caused by r963624 for overloaded local methods

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

Modified: 
tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java?rev=964980&r1=964979&r2=964980&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java
 (original)
+++ 
tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java
 Fri Jul 16 23:25:36 2010
@@ -230,9 +230,18 @@ public class RuntimeEndpointImpl extends
                 // chain is created. As the chain operations are the real 
interface types 
                 // they may be incompatible just because they are described in 
different 
                 // IDLs
-                if (operation.getName().equals(op.getName())) {
-                    invocationChainMap.put(operation, chain);
-                    return chain;
+                if (operation.getInterface().isRemotable()) {
+                    if (operation.getName().equals(op.getName())) {
+                        invocationChainMap.put(operation, chain);
+                        return chain;
+                    }
+                } else {
+                    // [rfeng] We need to run the compatibility check for 
local operations as they 
+                    // can be overloaded
+                    if (interfaceContractMapper.isCompatible(operation, op, 
Compatibility.SUBSET)) {
+                        invocationChainMap.put(operation, chain);
+                        return chain;
+                    }
                 }
             }
             // Cache it with the NULL_CHAIN to avoid NPE


Reply via email to