You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cz...@apache.org on 2015/09/19 11:08:42 UTC
svn commit: r1703963 -
/felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java
Author: cziegeler
Date: Sat Sep 19 09:08:41 2015
New Revision: 1703963
URL: http://svn.apache.org/viewvc?rev=1703963&view=rev
Log:
FELIX-5034 : Reduce and correct locking related to the hook registry
Modified:
felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java
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=1703963&r1=1703962&r2=1703963&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 Sat Sep 19 09:08:41 2015
@@ -3280,9 +3280,7 @@ public class Felix extends BundleImpl im
Bundle[] getBundles(BundleContext bc)
{
Collection<Bundle> bundles = m_installedBundles[IDENTIFIER_MAP_IDX].values();
- // If the requesting bundle is something other than the system bundle, return the shrunk
- // collection of bundles. If it *is* the system bundle, it should receive the unfiltered bundles.
- if ( !bundles.isEmpty() && bc.getBundle() != this )
+ if ( !bundles.isEmpty() )
{
Set<ServiceReference<org.osgi.framework.hooks.bundle.FindHook>> hooks =
getHookRegistry().getHooks(org.osgi.framework.hooks.bundle.FindHook.class);
@@ -3309,6 +3307,11 @@ public class Felix extends BundleImpl im
}
}
}
+ if ( bc.getBundle() != this ) {
+ // If the requesting bundle is something other than the system bundle, return the shrunk
+ // collection of bundles. If it *is* the system bundle, it should receive the unfiltered bundles.
+ bundles = shrunkBundles;
+ }
}
}