summaryrefslogtreecommitdiffstats
path: root/java/sca/modules
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-03-26 00:21:52 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-03-26 00:21:52 +0000
commit1322e9133edd81718645df20bbdafc6ad7eb4509 (patch)
treeb9a7dfd3c4160d9a06ef3f86fa7e175c2081c33e /java/sca/modules
parentab0b67e2e326ace3fa2eb154d0329663eb346cf7 (diff)
Avoid NPE if the reference doesn't have a binding
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@758478 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules')
-rw-r--r--java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositePolicyBuilderImpl.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositePolicyBuilderImpl.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositePolicyBuilderImpl.java
index 5b3c570db7..6f7f7af671 100644
--- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositePolicyBuilderImpl.java
+++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositePolicyBuilderImpl.java
@@ -337,7 +337,8 @@ public class CompositePolicyBuilderImpl extends BaseBuilderImpl implements Compo
// Find the corresponding binding in the componentType and inherit the intents/policySets
if (componentReference.getReference() != null) {
for (Binding binding : componentReference.getReference().getBindings()) {
- if (isEqual(epr.getBinding().getName(), binding.getName()) && (binding instanceof PolicySubject)) {
+ if (epr.getBinding() != null && isEqual(epr.getBinding().getName(), binding.getName())
+ && (binding instanceof PolicySubject)) {
isMutualExclusive((PolicySubject)epr.getBinding(), (PolicySubject)binding);
// Inherit from componentType.reference.binding
inherit(epr, binding);