diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules/assembly-xml')
-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); + } } } |