Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2006-08-16 21:31:00 -0400
committerThomas Watson2006-08-16 21:31:00 -0400
commitea0631b0b0064ef9d5c299f72f886430b975ee44 (patch)
treef6dccdc6d10dc6519589e3f2237b1b9943bdf280
parent159b2c862ae5db61c20f394dadf865e3275613ba (diff)
downloadrt.equinox.framework-ea0631b0b0064ef9d5c299f72f886430b975ee44.tar.gz
rt.equinox.framework-ea0631b0b0064ef9d5c299f72f886430b975ee44.tar.xz
rt.equinox.framework-ea0631b0b0064ef9d5c299f72f886430b975ee44.zip
Bug 152900 StateReader uses ArrayList.contains() taking 4% of all method callsR32x_v20060816
-rw-r--r--bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateReader.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateReader.java b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateReader.java
index f0e64e55a..d09b66eb7 100644
--- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateReader.java
+++ b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateReader.java
@@ -213,7 +213,15 @@ class StateReader {
result.addDependencies(deps, false); // no need to check dups; we already know there are none when we resolved (bug 152900)
}
// No need to set the dependencies between fragment and hosts; that was already done in the above loop (bug 152900)
-
+ // but we do need to set the dependencies between hosts and fragment.
+ HostSpecificationImpl hostSpec = (HostSpecificationImpl) result.getHost();
+ if (hostSpec != null) {
+ BundleDescription[] hosts = hostSpec.getHosts();
+ if (hosts != null) {
+ for (int i = 0; i < hosts.length; i++)
+ ((BundleDescriptionImpl) hosts[i]).addDependency(result, false);
+ }
+ }
// the rest is lazy loaded data
result.setFullyLoaded(false);
return result;

Back to the top