Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2016-11-06 07:49:46 -0500
committerAndrey Loskutov2016-11-30 03:09:25 -0500
commit7fc9069cd2869181c86355211a123e23f87a06cd (patch)
tree33d76ae095f1810c9a59a2924f870a14aea9d978
parent6607071ace83ee36cdbb931747962d7ef0f50815 (diff)
downloadrt.equinox.framework-7fc9069cd2869181c86355211a123e23f87a06cd.tar.gz
rt.equinox.framework-7fc9069cd2869181c86355211a123e23f87a06cd.tar.xz
rt.equinox.framework-7fc9069cd2869181c86355211a123e23f87a06cd.zip
Bug 507115 - NPE in ResolverImpl.unresolveBundle after importing pluginsY20161201-1000I20161201-0800I20161130-2000
into workspace Change-Id: I0a7ed9b6460b493344a485b9a4d64f4455abbf5c Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
-rw-r--r--bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverImpl.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverImpl.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverImpl.java
index f215c1b9b..cb14f5d1b 100644
--- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverImpl.java
+++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/module/ResolverImpl.java
@@ -2102,12 +2102,13 @@ public class ResolverImpl implements Resolver {
}
private void unresolveBundle(ResolverBundle bundle, boolean removed) {
- if (bundle == null)
- return;
// check the removed list if unresolving then remove from the removed list
List<BundleDescription> removedBundles = removalPending.remove(new Long(bundle.getBundleDescription().getBundleId()));
for (BundleDescription removedDesc : removedBundles) {
ResolverBundle re = bundleMapping.get(removedDesc);
+ if (re == null) {
+ continue;
+ }
unresolveBundle(re, true);
state.removeBundleComplete(removedDesc);
resolverExports.remove(re.getExportPackages());
@@ -2135,8 +2136,13 @@ public class ResolverImpl implements Resolver {
BundleDescription[] dependents = bundle.getBundleDescription().getDependents();
state.resolveBundle(bundle.getBundleDescription(), false, null, null, null, null, null, null, null, null);
// Unresolve dependents of 'bundle'
- for (int i = 0; i < dependents.length; i++)
- unresolveBundle(bundleMapping.get(dependents[i]), false);
+ for (int i = 0; i < dependents.length; i++) {
+ ResolverBundle db = bundleMapping.get(dependents[i]);
+ if (db == null) {
+ continue;
+ }
+ unresolveBundle(db, false);
+ }
}
public void bundleUpdated(BundleDescription newDescription, BundleDescription existingDescription, boolean pending) {

Back to the top