You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ri...@apache.org on 2011/08/02 20:47:50 UTC
svn commit: r1153240 - in
/felix/trunk/framework/src/main/java/org/apache/felix/framework:
BundleWiringImpl.java Felix.java
Author: rickhall
Date: Tue Aug 2 18:47:49 2011
New Revision: 1153240
URL: http://svn.apache.org/viewvc?rev=1153240&view=rev
Log:
Simplify old package admin impl method. (FELIX-2950)
Modified:
felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleWiringImpl.java
felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java
Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleWiringImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleWiringImpl.java?rev=1153240&r1=1153239&r2=1153240&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleWiringImpl.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleWiringImpl.java Tue Aug 2 18:47:49 2011
@@ -1433,7 +1433,7 @@ public class BundleWiringImpl implements
}
}
}
-// TODO: OSGi R4.3 - If we eliminate resolving from this method, then we can
+// TODO: OSGi R4.3/ELIMINATE RESOLVE - If we eliminate resolving from this method, then we can
// simplify this catch, since resolve throws resolve and bundle exceptions.
catch (Exception ex)
{
Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java?rev=1153240&r1=1153239&r2=1153240&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java Tue Aug 2 18:47:49 2011
@@ -1523,7 +1523,7 @@ public class Felix extends BundleImpl im
{
return null;
}
-// TODO: OSGi R4.3 - Previously, we try to resolve resource requests in
+// TODO: OSGi R4.3/ELIMINATE RESOLVE - Previously, we try to resolve resource requests in
// findClassOrResourceByDelegation() and fall back to local resource
// searching if it fails. Now we must attempt the resolve here since
// we cannot search by delegation until we are resolved and do the local
@@ -1565,7 +1565,7 @@ public class Felix extends BundleImpl im
{
return null;
}
-// TODO: OSGi R4.3 - Previously, we try to resolve resource requests in
+// TODO: OSGi R4.3/ELIMINATE RESOLVE - Previously, we try to resolve resource requests in
// findClassOrResourceByDelegation() and fall back to local resource
// searching if it fails. Now we must attempt the resolve here since
// we cannot search by delegation until we are resolved and do the local
@@ -3737,39 +3737,12 @@ public class Felix extends BundleImpl im
{
for (BundleCapability cap : caps)
{
- // See if the target bundle's revisions is one of the
- // resolved exporters of the package.
if (cap.getNamespace().equals(BundleRevision.PACKAGE_NAMESPACE))
{
-// TODO: OSGi R4.3 - We can probably do this in a more efficient way once
-// BundleWiring.getCapabilities() returns the proper result. We probably
-// Won't even need this method.
String pkgName = (String)
cap.getAttributes().get(BundleRevision.PACKAGE_NAMESPACE);
- Map<String, Object> attrs = new HashMap<String, Object>(1);
- attrs.put(BundleRevision.PACKAGE_NAMESPACE, pkgName);
- BundleRequirementImpl req =
- new BundleRequirementImpl(
- null,
- BundleRevision.PACKAGE_NAMESPACE,
- Collections.EMPTY_MAP,
- attrs);
- Set<BundleCapability> providers = m_resolver.getCandidates(req, false);
-
- // Search through the current providers to find the target revision.
- // We only want resolved capabilities.
- if (providers != null)
- {
- for (BundleCapability provider : providers)
- {
- if ((provider.getRevision().getWiring() != null)
- && (provider == cap))
- {
- list.add(new ExportedPackageImpl(
- this, (BundleImpl) bundle, br, cap));
- }
- }
- }
+ list.add(new ExportedPackageImpl(
+ this, (BundleImpl) bundle, br, cap));
}
}
}