Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2010-04-30 12:09:57 -0400
committerThomas Watson2010-04-30 12:09:57 -0400
commita3cbee8c1fb3832d9b23d9a1162eae3813b62a32 (patch)
treee337925b329d4b7522da512501eeebe14f589df7 /bundles/org.eclipse.osgi/resolver
parent69a795e41f45601f16922374ba411aa88fb2d78a (diff)
downloadrt.equinox.framework-a3cbee8c1fb3832d9b23d9a1162eae3813b62a32.tar.gz
rt.equinox.framework-a3cbee8c1fb3832d9b23d9a1162eae3813b62a32.tar.xz
rt.equinox.framework-a3cbee8c1fb3832d9b23d9a1162eae3813b62a32.zip
Bug 310705 - Weird resolution error when multiple singleton versions don't resolve
Diffstat (limited to 'bundles/org.eclipse.osgi/resolver')
-rw-r--r--bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java
index 1a5cd3b5e..64ff1dfe9 100644
--- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java
+++ b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java
@@ -399,7 +399,15 @@ public class ResolverImpl implements org.eclipse.osgi.service.resolver.Resolver
}
for (Iterator rejected = rejectedSingletons.iterator(); rejected.hasNext();) {
BundleDescription reject = (BundleDescription) rejected.next();
- BundleDescription sameName = state.getBundle(reject.getSymbolicName(), null);
+ // need to do a bit of work to figure out which bundle got selected
+ BundleDescription[] sameNames = state.getBundles(reject.getSymbolicName());
+ BundleDescription sameName = reject;
+ for (int i = 0; i < sameNames.length; i++) {
+ if (sameNames[i] != reject && sameNames[i].isSingleton() && !rejectedSingletons.contains(sameNames[i])) {
+ sameName = sameNames[i]; // we know this one got selected
+ break;
+ }
+ }
state.addResolverError(reject, ResolverError.SINGLETON_SELECTION, sameName.toString(), null);
}
if (resolveOptional)

Back to the top