From 1322e9133edd81718645df20bbdafc6ad7eb4509 Mon Sep 17 00:00:00 2001 From: rfeng Date: Thu, 26 Mar 2009 00:21:52 +0000 Subject: 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 --- .../tuscany/sca/assembly/builder/impl/CompositePolicyBuilderImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'java/sca/modules') 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); -- cgit v1.2.3