summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/core/src/main
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2008-08-11 06:44:29 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2008-08-11 06:44:29 +0000
commit1bcfd44d79aff347c08809a5555171cd490d6431 (patch)
treecd17b7640287bb503e05183b8d8224cbf0ef5678 /java/sca/modules/core/src/main
parent4fcefa96cd256eb7d5720324d596ff1272f5b183 (diff)
Protect against NPE when the InterfaceCOntract is also null
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@684646 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/core/src/main')
-rw-r--r--java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/CompositeActivatorImpl.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/CompositeActivatorImpl.java b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/CompositeActivatorImpl.java
index d205cbf823..6eb5f0d1e5 100644
--- a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/CompositeActivatorImpl.java
+++ b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/CompositeActivatorImpl.java
@@ -412,8 +412,14 @@ public class CompositeActivatorImpl implements CompositeActivator {
// Use the interface contract of the reference on the component type
Reference componentTypeRef = reference.getReference();
- InterfaceContract sourceContract =
- componentTypeRef == null ? reference.getInterfaceContract() : componentTypeRef.getInterfaceContract();
+
+ InterfaceContract sourceContract;
+ if (componentTypeRef == null || componentTypeRef.getInterfaceContract() == null) {
+ sourceContract = reference.getInterfaceContract();
+ } else {
+ sourceContract = componentTypeRef.getInterfaceContract();
+ }
+
sourceContract = sourceContract.makeUnidirectional(false);
EndpointReference wireSource =