diff options
author | bdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68> | 2011-02-18 04:29:00 +0000 |
---|---|---|
committer | bdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68> | 2011-02-18 04:29:00 +0000 |
commit | e589ec876037b21ad395e5e91b7272aa15a840e9 (patch) | |
tree | 09218d45131b8129745848e532be2487ec385a85 /sca-java-2.x/trunk/modules/builder/src/main/java/org/apache | |
parent | 800c9a317903c83e8810c63072083c448ca47731 (diff) |
Commit patch for TUSCANY-3836
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1071882 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/builder/src/main/java/org/apache')
-rw-r--r-- | sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/PolicyAppliesToBuilderImpl.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/PolicyAppliesToBuilderImpl.java b/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/PolicyAppliesToBuilderImpl.java index 1c958f70d4..c4dd9b4182 100644 --- a/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/PolicyAppliesToBuilderImpl.java +++ b/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/PolicyAppliesToBuilderImpl.java @@ -39,6 +39,7 @@ import org.apache.tuscany.sca.assembly.builder.BuilderContext; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; import org.apache.tuscany.sca.core.ExtensionPointRegistry; +import org.apache.tuscany.sca.definitions.Definitions; import org.apache.tuscany.sca.policy.PolicySet; import org.apache.tuscany.sca.policy.PolicySubject; import org.w3c.dom.Document; @@ -67,6 +68,11 @@ public class PolicyAppliesToBuilderImpl extends PolicyAttachmentBuilderImpl { public Composite build(Composite composite, BuilderContext context) throws CompositeBuilderException { try { + + Definitions definitions = context.getDefinitions(); + if (definitions == null || (definitions.getPolicySets().isEmpty() && definitions.getExternalAttachments().isEmpty()) ) { + return composite; + } // create a DOM for the Domain Composite Infoset Document document = saveAsDOM(composite); |