tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcombell...@apache.org
Subject svn commit: r658225 - /incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
Date Tue, 20 May 2008 12:54:55 GMT
Author: mcombellack
Date: Tue May 20 05:54:55 2008
New Revision: 658225

URL: http://svn.apache.org/viewvc?rev=658225&view=rev
Log:
Removed cast of Composite to PolicySetAttachPoint as it is not needed since Composite extends
PolicySetAttachPoint (FindBugs reported issue)

Modified:
    incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java

Modified: incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java?rev=658225&r1=658224&r2=658225&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
(original)
+++ incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
Tue May 20 05:54:55 2008
@@ -832,19 +832,13 @@
         List<Intent> compositeIntents = null;
         List<PolicySet> compositePolicySets = null;
         List<PolicySet> compositeApplicablePolicySets = null;
-        if (composite instanceof PolicySetAttachPoint) { 
-            resolveIntents(((PolicySetAttachPoint)composite).getRequiredIntents(), resolver);
-            resolvePolicySets(((PolicySetAttachPoint)composite).getPolicySets(), resolver);
-            resolvePolicySets(((PolicySetAttachPoint)composite).getApplicablePolicySets(),
resolver);
-            compositeIntents = ((PolicySetAttachPoint)composite).getRequiredIntents();
-            compositePolicySets = ((PolicySetAttachPoint)composite).getPolicySets();
-            compositeApplicablePolicySets = ((PolicySetAttachPoint)composite).getApplicablePolicySets();
-        } else {
-            compositeIntents = new ArrayList<Intent>();
-            compositePolicySets = new ArrayList<PolicySet>();
-            compositeApplicablePolicySets = new ArrayList<PolicySet>();
-        }
-        
+        resolveIntents(composite.getRequiredIntents(), resolver);
+        resolvePolicySets(composite.getPolicySets(), resolver);
+        resolvePolicySets(composite.getApplicablePolicySets(), resolver);
+        compositeIntents = composite.getRequiredIntents();
+        compositePolicySets = composite.getPolicySets();
+        compositeApplicablePolicySets = composite.getApplicablePolicySets();
+
         //Resolve composite services and references
         resolveContracts(composite, composite.getServices(), resolver);
         resolveContracts(composite, composite.getReferences(), resolver);



Mime
View raw message