From 1e3349ec77dfd5cca9a858a935b90f4427542756 Mon Sep 17 00:00:00 2001 From: bdaniel Date: Wed, 1 Sep 2010 05:31:01 +0000 Subject: Fix bug in PolicyAppliesToBuilder that was causing PolicySets to be incorrectly removed from endpoints git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@991436 13f79535-47bb-0310-9956-ffa450edef68 --- .../tuscany/sca/builder/impl/PolicyAppliesToBuilderImpl.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sca-java-2.x/trunk/modules/builder/src/main/java') 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 c9cd6b36d0..132cfa5656 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 @@ -96,19 +96,19 @@ public class PolicyAppliesToBuilderImpl extends PolicyAttachmentBuilderImpl { for (ComponentService componentService : component.getServices()) { for (Endpoint ep : componentService.getEndpoints()) { - checkAppliesToSubject(document, appliesToSubjects, topComposite, (PolicySubject)ep.getService(), ep.getPolicySets()); + checkAppliesToSubject(document, appliesToSubjects, topComposite, (PolicySubject)ep.getService(), ep.getService().getPolicySets()); if (ep.getBinding() instanceof PolicySubject) { - checkAppliesToSubject(document, appliesToSubjects, topComposite, (PolicySubject)ep.getBinding(), ep.getPolicySets()); + checkAppliesToSubject(document, appliesToSubjects, topComposite, (PolicySubject)ep.getBinding(), ((PolicySubject)ep.getBinding()).getPolicySets()); } } } for (ComponentReference componentReference : component.getReferences()) { for (EndpointReference epr : componentReference.getEndpointReferences()) { - checkAppliesToSubject(document, appliesToSubjects, topComposite, (PolicySubject)epr.getReference(), epr.getPolicySets()); + checkAppliesToSubject(document, appliesToSubjects, topComposite, (PolicySubject)epr.getReference(), epr.getReference().getPolicySets()); if (epr.getBinding() instanceof PolicySubject) { - checkAppliesToSubject(document, appliesToSubjects, topComposite, (PolicySubject)epr.getBinding(), epr.getPolicySets()); - } + checkAppliesToSubject(document, appliesToSubjects, topComposite, (PolicySubject)epr.getBinding(), ((PolicySubject)epr.getBinding()).getPolicySets()); + } } } -- cgit v1.2.3