Remove some unnecessary casts after introducing R5 API. (FELIX-3504)


git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1351040 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/BundleRevisionDependencies.java b/framework/src/main/java/org/apache/felix/framework/BundleRevisionDependencies.java
index 1e3a8fe..9cdb9d8 100644
--- a/framework/src/main/java/org/apache/felix/framework/BundleRevisionDependencies.java
+++ b/framework/src/main/java/org/apache/felix/framework/BundleRevisionDependencies.java
@@ -41,9 +41,7 @@
 
     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 @@
                     {
                         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 @@
                     {
                         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 @@
                     {
                         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 @@
             {
                 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 @@
                         }
                         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());
                         }
                     }
                 }