summaryrefslogtreecommitdiffstats
path: root/java/sca
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-07-31 11:24:46 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-07-31 11:24:46 +0000
commitcc2d0460bff418b6f822a0419d0a562cb785b85b (patch)
tree18a83c4aa7f96661495acf00b5adf6a5a3614db8 /java/sca
parentb71b399efeda1f839563322f1b59de4b66c38570 (diff)
Be more defensive when checking for interface compatibility. Prevent NPE when testing ASM_8003.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@799581 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca')
-rw-r--r--java/sca/modules/interface/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceContractMapperImpl.java12
1 files changed, 12 insertions, 0 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 524182f66c..289fd25594 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
@@ -218,6 +218,18 @@ public class InterfaceContractMapperImpl implements InterfaceContractMapper {
// Shortcut for performance
return true;
}
+
+ if (source == null || target == null){
+ return false;
+ }
+
+ if (source.getInterface() == target.getInterface()){
+ return true;
+ }
+
+ if (source.getInterface() == null || target.getInterface() == null){
+ return false;
+ }
if (source.getInterface().isDynamic() || target.getInterface().isDynamic()) {
return true;