Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2012-04-30 13:50:16 -0400
committerThomas Watson2012-04-30 13:50:16 -0400
commitbef1cc9df1203fe05e5781dbe7b015f317a70cf5 (patch)
tree79cb17d566cc5b6a5a78760d4c0be2bc78949800
parentca1d6ed9154dcfa26a0a46a39940fdfda2af2a52 (diff)
downloadrt.equinox.framework-bef1cc9df1203fe05e5781dbe7b015f317a70cf5.tar.gz
rt.equinox.framework-bef1cc9df1203fe05e5781dbe7b015f317a70cf5.tar.xz
rt.equinox.framework-bef1cc9df1203fe05e5781dbe7b015f317a70cf5.zip
-rw-r--r--bundles/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/PackageAdminImpl.java14
1 files changed, 6 insertions, 8 deletions
diff --git a/bundles/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/PackageAdminImpl.java b/bundles/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/PackageAdminImpl.java
index 91d5aea3f..f9e14605d 100644
--- a/bundles/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/PackageAdminImpl.java
+++ b/bundles/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/PackageAdminImpl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2011 IBM Corporation and others.
+ * Copyright (c) 2003, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -224,7 +224,6 @@ public class PackageAdminImpl implements PackageAdmin, FrameworkWiring {
synchronized (framework.bundles) {
// now collect the descriptions to refresh
List<BundleDescription> results = new ArrayList<BundleDescription>(numBundles);
- BundleDelta[] addDeltas = null;
for (int i = 0; i < numBundles; i++) {
BundleDescription description = ((AbstractBundle) bundles[i]).getBundleDescription();
if (description != null && description.getBundleId() != 0 && !results.contains(description))
@@ -233,13 +232,11 @@ public class PackageAdminImpl implements PackageAdmin, FrameworkWiring {
// add in any bundles that have the same symbolic name see bug (169593)
AbstractBundle[] sameNames = framework.bundles.getBundles(bundles[i].getSymbolicName());
if (sameNames != null && sameNames.length > 1) {
- if (addDeltas == null)
- addDeltas = systemState.getChanges().getChanges(BundleDelta.ADDED, false);
for (int j = 0; j < sameNames.length; j++)
if (sameNames[j] != bundles[i]) {
BundleDescription sameName = sameNames[j].getBundleDescription();
if (sameName != null && sameName.getBundleId() != 0 && !results.contains(sameName)) {
- if (checkExtensionBundle(sameName, addDeltas))
+ if (checkExtensionBundle(sameName))
results.add(sameName);
}
}
@@ -289,12 +286,13 @@ public class PackageAdminImpl implements PackageAdmin, FrameworkWiring {
}
}
- private boolean checkExtensionBundle(BundleDescription sameName, BundleDelta[] addDeltas) {
+ private boolean checkExtensionBundle(BundleDescription sameName) {
if (sameName.getHost() == null || !sameName.isResolved())
return true; // only do this extra check for resolved fragment bundles
- // only add fragments of the system bundle when newly added bundles exist.
- if (((BundleDescription) sameName.getHost().getSupplier()).getBundleId() != 0 || addDeltas.length > 0)
+ // only add fragments if they are not for the system bundle
+ if (((BundleDescription) sameName.getHost().getSupplier()).getBundleId() != 0)
return true;
+ // never do this for resolved system bundle fragments
return false;
}

Back to the top