Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2018-02-08 20:01:24 +0000
committerStephan Herrmann2018-02-10 15:24:43 +0000
commit2336dbd29509e7557735693482262b233d3fb1bd (patch)
tree62b3257259ae7e02fe13465b7148a07bda330828
parent275e6774eb33c073440dd0ed215661bda437a065 (diff)
downloadorg.eclipse.objectteams-2336dbd29509e7557735693482262b233d3fb1bd.tar.gz
org.eclipse.objectteams-2336dbd29509e7557735693482262b233d3fb1bd.tar.xz
org.eclipse.objectteams-2336dbd29509e7557735693482262b233d3fb1bd.zip
Backport Bug 530909 - Bogus "case bundle SELF cannot be resolved"
-rw-r--r--plugins/org.eclipse.objectteams.otequinox/src/org/eclipse/objectteams/internal/osgi/weaving/AspectBindingRegistry.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/org.eclipse.objectteams.otequinox/src/org/eclipse/objectteams/internal/osgi/weaving/AspectBindingRegistry.java b/plugins/org.eclipse.objectteams.otequinox/src/org/eclipse/objectteams/internal/osgi/weaving/AspectBindingRegistry.java
index 3fc838458..184ccd266 100644
--- a/plugins/org.eclipse.objectteams.otequinox/src/org/eclipse/objectteams/internal/osgi/weaving/AspectBindingRegistry.java
+++ b/plugins/org.eclipse.objectteams.otequinox/src/org/eclipse/objectteams/internal/osgi/weaving/AspectBindingRegistry.java
@@ -142,6 +142,7 @@ public class AspectBindingRegistry {
bindings.add(binding);
// TODO(SH): maybe enforce that every bundle id is given only once?
+ boolean isSelfAdaptation = baseBundleId.toUpperCase().equals(SELF);
//teams:
try {
for (int j = 0, count = 0; count < teamCount; j++) {
@@ -160,7 +161,7 @@ public class AspectBindingRegistry {
}
}
- String realBaseBundleId = baseBundleId.toUpperCase().equals(SELF) ? aspectBundleId : baseBundleId;
+ String realBaseBundleId = isSelfAdaptation ? aspectBundleId : baseBundleId;
addBindingForBaseBundle(realBaseBundleId, binding);
addBindingForAspectBundle(aspectBundleId, binding);
hook.setBaseTripWire(packageAdmin, realBaseBundleId, baseBundle);
@@ -169,7 +170,7 @@ public class AspectBindingRegistry {
} catch (Throwable t) {
log(t, "Invalid aspectBinding extension");
}
- if (packageAdmin != null && aspectBundle != null && !binding.hasScannedTeams) {
+ if (packageAdmin != null && aspectBundle != null && !binding.hasScannedTeams && !isSelfAdaptation) {
@SuppressWarnings("deprecation")
Bundle[] baseBundles = packageAdmin.getBundles(baseBundleId, null);
if (baseBundles == null || baseBundles.length == 0 || (baseBundles[0].getState() < Bundle.RESOLVED)) {

Back to the top