summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules
diff options
context:
space:
mode:
authorbdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68>2011-06-29 20:16:05 +0000
committerbdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68>2011-06-29 20:16:05 +0000
commit1fb59defe41d14db5969726dc9df4c811e715ccc (patch)
treebe19425a45ad17ab6bf1062d47be5fdf97a2ad03 /sca-java-2.x/trunk/modules
parent3a59e792ac703cd08b03519427a8b1f50145da8e (diff)
Return correct interface contract when interfaces are compatible but not assignable from each other
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1141229 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules')
-rw-r--r--sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java
index dcb2b499e3..fd14c8c03e 100644
--- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java
+++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java
@@ -470,6 +470,12 @@ public class ComponentContextImpl implements RuntimeComponentContext {
}
InterfaceContractMapper ifcm = registry.getExtensionPoint(InterfaceContractMapper.class);
compatible = ifcm.isCompatibleSubset(biContract, interfaceContract);
+ // If the business interface class is not assignable from the service interface class but
+ // they are compatible, we need to return an InterfaceContract with the business interface
+ // class to store on the reference side.
+ if ( compatible ) {
+ return biContract;
+ }
}
}