Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2016-12-07 21:50:26 +0000
committerStephan Herrmann2016-12-07 21:50:26 +0000
commitc39ac67147d5b78f3f03b3599a96f1976980d04f (patch)
tree9a3301e7ad55da297602749e2095a0ceed585e41
parent58108cfb9f801d033a645e2e11b44fc54bb241a8 (diff)
downloadorg.eclipse.objectteams-c39ac67147d5b78f3f03b3599a96f1976980d04f.tar.gz
org.eclipse.objectteams-c39ac67147d5b78f3f03b3599a96f1976980d04f.tar.xz
org.eclipse.objectteams-c39ac67147d5b78f3f03b3599a96f1976980d04f.zip
Bug 508852: [otre] Team causes ClassNotFoundException if roles bind toreleases/OTDT_2.5.2builds/201612071657
different base plugins
-rw-r--r--plugins/org.eclipse.objectteams.otequinox/src/org/eclipse/objectteams/internal/osgi/weaving/AspectBinding.java22
1 files changed, 13 insertions, 9 deletions
diff --git a/plugins/org.eclipse.objectteams.otequinox/src/org/eclipse/objectteams/internal/osgi/weaving/AspectBinding.java b/plugins/org.eclipse.objectteams.otequinox/src/org/eclipse/objectteams/internal/osgi/weaving/AspectBinding.java
index 164e67bdd..cc6f1ef72 100644
--- a/plugins/org.eclipse.objectteams.otequinox/src/org/eclipse/objectteams/internal/osgi/weaving/AspectBinding.java
+++ b/plugins/org.eclipse.objectteams.otequinox/src/org/eclipse/objectteams/internal/osgi/weaving/AspectBinding.java
@@ -81,7 +81,7 @@ public class AspectBinding {
boolean importsAddedToSuper;
boolean importsAddedToSub;
- final List<String> baseClassNames = new ArrayList<>();
+ final Set<String> baseClassNames = new HashSet<>();
public final List<String> superBases = new ArrayList<>(); // logging / debugging only
@@ -98,23 +98,27 @@ public class AspectBinding {
/** After scanning class file attributes: add the names of all bound base classes. */
public void addBaseClassNames(Collection<String> baseClassNames) {
- this.baseClassNames.addAll(baseClassNames);
AspectBinding.this.allBaseClassNames.addAll(baseClassNames);
for (String baseClassName : baseClassNames) {
- Set<TeamBinding> teams = baseBundle.teamsPerBase.get(baseClassName);
- if (teams == null)
- baseBundle.teamsPerBase.put(baseClassName, teams = new HashSet<>());
- teams.add(this);
+ if (this.baseClassNames.add(baseClassName)) {
+ Set<TeamBinding> teams = baseBundle.teamsPerBase.get(baseClassName);
+ if (teams == null)
+ baseBundle.teamsPerBase.put(baseClassName, teams = new HashSet<>());
+ teams.add(this);
+ }
}
}
void connectEquivalent(TeamBinding equivalent) {
- this.equivalenceSet.add(equivalent);
+ if (this == equivalent)
+ return;
+ if (!this.equivalenceSet.add(equivalent))
+ return;
boolean locallyHaveBases = !this.baseClassNames.isEmpty();
if (!equivalent.baseClassNames.isEmpty())
- this.baseClassNames.addAll(equivalent.baseClassNames);
+ this.addBaseClassNames(equivalent.baseClassNames);
if (locallyHaveBases)
- equivalent.baseClassNames.addAll(this.baseClassNames);
+ equivalent.addBaseClassNames(this.baseClassNames);
}
@SuppressWarnings("unchecked")

Back to the top