summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--java/sca/modules/interface/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceContractMapperImpl.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/java/sca/modules/interface/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceContractMapperImpl.java b/java/sca/modules/interface/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceContractMapperImpl.java
index f13da1d6a1..647dc2021e 100644
--- a/java/sca/modules/interface/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceContractMapperImpl.java
+++ b/java/sca/modules/interface/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceContractMapperImpl.java
@@ -79,28 +79,29 @@ public class InterfaceContractMapperImpl implements InterfaceContractMapper {
DataType sourceOutputType = source.getOutputType();
DataType targetOutputType = target.getOutputType();
- // Note the target output type is now the source for checking
- // compatibility
- if (!isCompatible(targetOutputType, sourceOutputType, remotable)) {
- return false;
- }
-
boolean checkSourceWrapper = true;
List<DataType> sourceInputType = source.getInputType().getLogical();
if (source.isWrapperStyle() && source.getWrapper() != null) {
sourceInputType = source.getWrapper().getUnwrappedInputType().getLogical();
+ sourceOutputType = source.getWrapper().getUnwrappedOutputType();
checkSourceWrapper = false;
}
boolean checkTargetWrapper = true;
List<DataType> targetInputType = target.getInputType().getLogical();
if (target.isWrapperStyle() && target.getWrapper() != null) {
targetInputType = target.getWrapper().getUnwrappedInputType().getLogical();
+ targetOutputType = target.getWrapper().getUnwrappedOutputType();
checkTargetWrapper = false;
}
if (checkSourceWrapper != checkTargetWrapper) {
return true;
}
+
+ if (!isCompatible(targetOutputType, sourceOutputType, remotable)) {
+ return false;
+ }
+
if (sourceInputType.size() != targetInputType.size()) {
return false;
}