felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r1351040 - /felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleRevisionDependencies.java
Date Sun, 17 Jun 2012 02:54:00 GMT
Author: rickhall
Date: Sun Jun 17 02:54:00 2012
New Revision: 1351040

URL: http://svn.apache.org/viewvc?rev=1351040&view=rev
Log:
Remove some unnecessary casts after introducing R5 API. (FELIX-3504)

Modified:
    felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleRevisionDependencies.java

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleRevisionDependencies.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleRevisionDependencies.java?rev=1351040&r1=1351039&r2=1351040&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleRevisionDependencies.java
(original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleRevisionDependencies.java
Sun Jun 17 02:54:00 2012
@@ -41,9 +41,7 @@ class BundleRevisionDependencies
 
     public synchronized void addDependent(BundleWire bw)
     {
-// TODO: OSGi R4.4 - Eventually we won't need to use the impl type here,
-//       since the plan is to standardize on this method for the OBR spec.
-        BundleRevision provider = ((BundleWireImpl) bw).getProvider();
+        BundleRevision provider = bw.getProvider();
         Map<BundleCapability, Set<BundleWire>> caps =
             m_dependentsMap.get(provider);
         if (caps == null)
@@ -186,10 +184,7 @@ class BundleRevisionDependencies
                     {
                         for (BundleWire dependentWire : entry.getValue())
                         {
-// TODO: OSGi R4.4 - Eventually we won't need to use the impl type here,
-//       since the plan is to standardize on this method for the OBR spec.
-                            result.add(((BundleWireImpl) dependentWire)
-                                .getRequirer().getBundle());
+                            result.add(dependentWire.getRequirer().getBundle());
                         }
                     }
                 }
@@ -227,10 +222,7 @@ class BundleRevisionDependencies
                     {
                         for (BundleWire dependentWire : entry.getValue())
                         {
-// TODO: OSGi R4.4 - Eventually we won't need to use the impl type here,
-//       since the plan is to standardize on this method for the OBR spec.
-                            result.add(((BundleWireImpl) dependentWire)
-                                .getRequirer().getBundle());
+                            result.add(dependentWire.getRequirer().getBundle());
                         }
                     }
                 }
@@ -260,10 +252,7 @@ class BundleRevisionDependencies
                     {
                         for (BundleWire dependentWire : entry.getValue())
                         {
-// TODO: OSGi R4.4 - Eventually we won't need to use the impl type here,
-//       since the plan is to standardize on this method for the OBR spec.
-                            result.add(((BundleWireImpl) dependentWire)
-                                .getRequirer().getBundle());
+                            result.add(dependentWire.getRequirer().getBundle());
                         }
                     }
                 }
@@ -284,10 +273,8 @@ class BundleRevisionDependencies
             {
                 for (BundleWire bw : wiring.getRequiredWires(null))
                 {
-// TODO: OSGi R4.4 - Eventually we won't need to use the impl type here,
-//       since the plan is to standardize on this method for the OBR spec.
                     Map<BundleCapability, Set<BundleWire>> caps =
-                        m_dependentsMap.get(((BundleWireImpl) bw).getProvider());
+                        m_dependentsMap.get(bw.getProvider());
                     if (caps != null)
                     {
                         List<BundleCapability> gc = new ArrayList<BundleCapability>();
@@ -306,9 +293,7 @@ class BundleRevisionDependencies
                         }
                         if (caps.isEmpty())
                         {
-// TODO: OSGi R4.4 - Eventually we won't need to use the impl type here,
-//       since the plan is to standardize on this method for the OBR spec.
-                            m_dependentsMap.remove(((BundleWireImpl) bw).getProvider());
+                            m_dependentsMap.remove(bw.getProvider());
                         }
                     }
                 }



Mime
View raw message