Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2013-10-07 21:45:47 +0000
committerThomas Watson2013-10-07 21:55:23 +0000
commit18463beece9f1f4c5b22c675cb343fc84af447f1 (patch)
treeccc36f7529e58388a29e221e1d2911971bde35fb /bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleDatabase.java
parentada5912acdcc00833f6898c70ea4ca684020dffb (diff)
downloadrt.equinox.framework-18463beece9f1f4c5b22c675cb343fc84af447f1.tar.gz
rt.equinox.framework-18463beece9f1f4c5b22c675cb343fc84af447f1.tar.xz
rt.equinox.framework-18463beece9f1f4c5b22c675cb343fc84af447f1.zip
Bug 418811 - NPE possible for creating a class loader from uninstalled bundleI20131009-0430I20131008-2330
Diffstat (limited to 'bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleDatabase.java')
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleDatabase.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleDatabase.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleDatabase.java
index 619d8448c..2c4feb5a4 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleDatabase.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleDatabase.java
@@ -394,6 +394,7 @@ public class ModuleDatabase {
// remove any wires from unresolved wirings that got removed
for (Map.Entry<ModuleWiring, Collection<ModuleWire>> entry : toRemoveWireLists.entrySet()) {
List<ModuleWire> provided = entry.getKey().getProvidedModuleWires(null);
+ // No null checks; we are holding the write lock here.
provided.removeAll(entry.getValue());
entry.getKey().setProvidedWires(provided);
for (ModuleWire removedWire : entry.getValue()) {
@@ -612,6 +613,7 @@ public class ModuleDatabase {
if (wiring == null) {
continue;
}
+ // No null check; we are holding the database lock here.
for (ModuleWire wire : wiring.getRequiredModuleWires(null)) {
ModuleRequirement req = wire.getRequirement();
// Add all requirements that are not package requirements.

Back to the top