Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2014-11-07 22:15:21 +0000
committerThomas Watson2014-11-07 22:15:21 +0000
commitecca59a8bd7a8e822420236d2cd370b465066a5c (patch)
treea34a00cc27631765a476c5f23cd3769a77eff54e
parentd9b63c1587a976988f98635f4388f602f1a4f55e (diff)
downloadrt.equinox.framework-ecca59a8bd7a8e822420236d2cd370b465066a5c.tar.gz
rt.equinox.framework-ecca59a8bd7a8e822420236d2cd370b465066a5c.tar.xz
rt.equinox.framework-ecca59a8bd7a8e822420236d2cd370b465066a5c.zip
Bug 449779 - Deadlock within the OSGi frameworkI20141111-0830I20141111-0800
- Ensure permission caches are cleared even with a null loader to invalidateWiring
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxContainerAdaptor.java25
1 files changed, 12 insertions, 13 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxContainerAdaptor.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxContainerAdaptor.java
index b2dbb2bc3..74058ea77 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxContainerAdaptor.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxContainerAdaptor.java
@@ -147,25 +147,24 @@ public class EquinoxContainerAdaptor extends ModuleContainerAdaptor {
if (current instanceof BundleLoader) {
BundleLoader bundleLoader = (BundleLoader) current;
bundleLoader.close();
- long updatedTimestamp = storage.getModuleDatabase().getRevisionsTimestamp();
- if (System.getSecurityManager() != null && updatedTimestamp != lastSecurityAdminFlush.getAndSet(updatedTimestamp)) {
- storage.getSecurityAdmin().clearCaches();
- List<Module> modules = storage.getModuleContainer().getModules();
- for (Module module : modules) {
- for (ModuleRevision revision : module.getRevisions().getModuleRevisions()) {
- Generation generation = (Generation) revision.getRevisionInfo();
- if (generation != null) {
- ProtectionDomain domain = generation.getDomain();
- if (domain != null) {
- ((BundlePermissions) domain.getPermissions()).clearPermissionCache();
- }
+ }
+ long updatedTimestamp = storage.getModuleDatabase().getRevisionsTimestamp();
+ if (System.getSecurityManager() != null && updatedTimestamp != lastSecurityAdminFlush.getAndSet(updatedTimestamp)) {
+ storage.getSecurityAdmin().clearCaches();
+ List<Module> modules = storage.getModuleContainer().getModules();
+ for (Module module : modules) {
+ for (ModuleRevision revision : module.getRevisions().getModuleRevisions()) {
+ Generation generation = (Generation) revision.getRevisionInfo();
+ if (generation != null) {
+ ProtectionDomain domain = generation.getDomain();
+ if (domain != null) {
+ ((BundlePermissions) domain.getPermissions()).clearPermissionCache();
}
}
}
}
}
clearManifestCache(moduleWiring);
-
}
private void clearManifestCache(ModuleWiring moduleWiring) {

Back to the top