summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositePolicyBuilderImpl.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositePolicyBuilderImpl.java b/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositePolicyBuilderImpl.java
index db26b4550a..e6444722aa 100644
--- a/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositePolicyBuilderImpl.java
+++ b/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositePolicyBuilderImpl.java
@@ -196,6 +196,13 @@ public class CompositePolicyBuilderImpl extends ComponentPolicyBuilderImpl imple
}
if (implementation instanceof Composite) {
+
+ // POL-4009 componentType attached policySets are ignored when policySets are
+ // attached to the using component definition.
+ if ( !component.getPolicySets().isEmpty() || !composite.getPolicySets().isEmpty() ) {
+ implementation.getPolicySets().clear();
+ }
+
inherit(implementation, Intent.Type.implementation, true, component, composite);
computePolicies((Composite)implementation, context);
expandDefaultIntents(implementation,context);