diff options
author | bdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68> | 2010-07-19 18:37:01 +0000 |
---|---|---|
committer | bdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68> | 2010-07-19 18:37:01 +0000 |
commit | f1624a9872df8f8bf9b6716354b416403d38df49 (patch) | |
tree | 62fba25e7a69ca293e90713e67c6f47abae9d6e0 /sca-java-2.x/trunk/modules | |
parent | a0d8a49fa968f508993af66c8b48dd375252d73c (diff) |
Ignore policy sets on a composite implementation when the using component has attached policies
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@965579 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules')
-rw-r--r-- | sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/CompositePolicyBuilderImpl.java | 7 |
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); |