Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2006-07-17 09:07:37 -0400
committerThomas Watson2006-07-17 09:07:37 -0400
commit4ef6e2f64c76dd8b5584476f8b72da4a06f9e680 (patch)
tree542a7369b9d3584b10f43b254bac20d1c360a64e
parent23de8a4b38b2ffb7b5e507ba77f5c523a37d32fc (diff)
downloadrt.equinox.framework-4ef6e2f64c76dd8b5584476f8b72da4a06f9e680.tar.gz
rt.equinox.framework-4ef6e2f64c76dd8b5584476f8b72da4a06f9e680.tar.xz
rt.equinox.framework-4ef6e2f64c76dd8b5584476f8b72da4a06f9e680.zip
Bug 145067 Inaccurate processing of uses directive
-rw-r--r--bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/GroupingChecker.java18
1 files changed, 15 insertions, 3 deletions
diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/GroupingChecker.java b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/GroupingChecker.java
index 4b22dc2be..3241f4c1a 100644
--- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/GroupingChecker.java
+++ b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/GroupingChecker.java
@@ -31,9 +31,21 @@ public class GroupingChecker {
private ResolverExport[] getConstraints(ResolverExport constrained) {
// check the cache first
Object[] cachedResults = getCachedConstraints(constrained);
- if (cachedResults != null && cachedResults[1] != null)
- // we have aready cached the results for this return the cached results
- return (ResolverExport[]) cachedResults[1];
+ if (cachedResults != null && cachedResults[1] != null) {
+ if (!constrained.getExporter().isResolved()) {
+ // need to make sure none of the current constraints are dropped
+ ResolverExport[] constraints = (ResolverExport[]) cachedResults[1];
+ boolean dropped = false;
+ for (int i = 0; !dropped && i < constraints.length; i++)
+ dropped = constraints[i].isDropped();
+ if (!dropped)
+ return constraints;
+ // otherwise recompute the transitive constraints below
+ } else {
+ // we have aready cached the results for this return the cached results
+ return (ResolverExport[]) cachedResults[1];
+ }
+ }
ArrayList resultlist = getConstraintsList(constrained);
ResolverExport[] results = (ResolverExport[]) resultlist.toArray(new ResolverExport[resultlist.size()]);
if (!checkCycles || constrained.getExporter().isResolved()) {

Back to the top