Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2006-08-10 12:07:45 -0400
committerThomas Watson2006-08-10 12:07:45 -0400
commit3714425e3eab7d339150f1ea3855753705318f0b (patch)
tree5a057ce55d34bd8cf4067678fdcee532a7e94666
parent61b3228a4122ced2fb9af6fd6d7b286c38046e0e (diff)
downloadrt.equinox.framework-3714425e3eab7d339150f1ea3855753705318f0b.tar.gz
rt.equinox.framework-3714425e3eab7d339150f1ea3855753705318f0b.tar.xz
rt.equinox.framework-3714425e3eab7d339150f1ea3855753705318f0b.zip
Bug 152042 Fragments not resolving as expected
-rw-r--r--bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java26
1 files changed, 1 insertions, 25 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 00d250960..78f62794c 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
@@ -290,31 +290,7 @@ public class ResolverImpl implements org.eclipse.osgi.service.resolver.Resolver
private void attachFragment(ResolverBundle bundle, ArrayList rejectedSingletons) {
if (!bundle.isFragment() || !bundle.isResolvable() || rejectedSingletons.contains(bundle.getBundle()))
return;
- // select singleton fragments
- if (bundle.getBundle().isSingleton()) {
- BundleDescription bundleDesc = bundle.getBundle();
- Object[] sameName = resolverBundles.get(bundleDesc.getName());
- if (sameName.length > 1) {
- // we found some other bundles with the same BSN
- for (int j = 0; j < sameName.length; j++) {
- BundleDescription sameNameDesc = ((ResolverBundle) sameName[j]).getBundle();
- if (sameName[j] == bundle || !sameNameDesc.isSingleton() || rejectedSingletons.contains(sameNameDesc))
- continue; // Ignore the bundle we are selecting, non-singletons and rejected singletons
- boolean rejectedPolicy;
- if (selectionPolicy == null)
- // if the bundle sameNameDesc is resolved or has a greater version then reject the other bundle
- rejectedPolicy = sameNameDesc.isResolved() || sameNameDesc.getVersion().compareTo(bundle.getBundle().getVersion()) > 0;
- else
- rejectedPolicy = selectionPolicy.compare(sameNameDesc, bundle.getBundle()) < 0;
- if (rejectedPolicy) {
- rejectedSingletons.add(bundle.getBundle());
- return;
- }
- // reject the bundle sameNameDesc
- rejectedSingletons.add(sameNameDesc);
- }
- }
- }
+ // no need to select singletons now; it will be done when we select the rest of the singleton bundles (bug 152042)
// find all available hosts to attach to.
BundleConstraint hostConstraint = bundle.getHost();
Object[] hosts = resolverBundles.get(hostConstraint.getVersionConstraint().getName());

Back to the top