diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2010-02-26 21:25:33 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2010-02-26 21:25:33 +0000 |
commit | 736d9f948449d956568d122224278acd1af9b19e (patch) | |
tree | 539800174069653541b77d04d804a17c82f7f04d /sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache | |
parent | 7271f9fa469c4a769a78b8575f55fcd8c8b673f5 (diff) |
TUSCANY-3463 - Removing the policySet that is being flatted to avoid issues during resolution
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@916821 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache')
-rw-r--r-- | sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsProcessor.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsProcessor.java b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsProcessor.java index 745e94354a..629c9e255f 100644 --- a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsProcessor.java +++ b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/DefinitionsProcessor.java @@ -250,12 +250,15 @@ public class DefinitionsProcessor extends BaseStAXArtifactProcessor implements S // Flat intentMap structure by creating a policySet for each one List<PolicySet> copy = new ArrayList<PolicySet>(scaDefns.getPolicySets()); for (PolicySet policySet : copy) { - //[LRESENDE] Do we need to remove the current policySet and just include the flat one based on qualifiers ? - //Maybe not, as this would resolve to explicitly attached policySet + //[lresende] Do we need to remove the current policySet and just include the flat one based on qualifiers ? + //If we don't, the policy is being resolved to the one that has intentMap and no direct concrete policies + boolean remove = false; //process intent maps for(IntentMap intentMap : policySet.getIntentMaps()) { for(Qualifier qualifier : intentMap.getQualifiers()) { + remove = true; + PolicySet qualifiedPolicySet = policyFactory.createPolicySet(); qualifiedPolicySet.setAppliesTo(policySet.getAppliesTo()); qualifiedPolicySet.setAppliesToXPathExpression(policySet.getAttachToXPathExpression()); @@ -271,6 +274,10 @@ public class DefinitionsProcessor extends BaseStAXArtifactProcessor implements S scaDefns.getPolicySets().add(qualifiedPolicySet); } } + + if(remove) { + scaDefns.getPolicySets().remove(policySet); + } } } |