summaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core/src
diff options
context:
space:
mode:
authoraclement <aclement>2004-08-02 10:14:39 +0000
committeraclement <aclement>2004-08-02 10:14:39 +0000
commit9aed31d18e3848c72c6963dc3a6ee4661a79add9 (patch)
tree9ee7dbb7c1d389e6c879c78146b2fb457b7c9104 /org.aspectj.ajdt.core/src
parent5baba85f6c5a3850b4bd3f1205ac831d9d3761cc (diff)
downloadaspectj-9aed31d18e3848c72c6963dc3a6ee4661a79add9.tar.gz
aspectj-9aed31d18e3848c72c6963dc3a6ee4661a79add9.zip
Fix for Bugzilla Bug 70773
AspectJ Error: ConncurrentModificationException thrown: null
Diffstat (limited to 'org.aspectj.ajdt.core/src')
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java29
1 files changed, 18 insertions, 11 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
index ffc6333db..05465c469 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
@@ -384,13 +384,16 @@ public class AjLookupEnvironment extends LookupEnvironment {
private List pendingTypesToFinish = new ArrayList();
- boolean inBinaryTypeCreation = false;
+ boolean inBinaryTypeCreationAndWeaving = false;
+ boolean processingTheQueue = false;
+
public BinaryTypeBinding createBinaryTypeFrom(
IBinaryType binaryType,
PackageBinding packageBinding,
boolean needFieldsAndMethods)
{
- if (inBinaryTypeCreation) {
+
+ if (inBinaryTypeCreationAndWeaving) {
BinaryTypeBinding ret = super.createBinaryTypeFrom(
binaryType,
packageBinding,
@@ -399,23 +402,27 @@ public class AjLookupEnvironment extends LookupEnvironment {
return ret;
}
-
- inBinaryTypeCreation = true;
+ inBinaryTypeCreationAndWeaving = true;
try {
BinaryTypeBinding ret = super.createBinaryTypeFrom(
binaryType,
packageBinding,
needFieldsAndMethods);
- weaveInterTypeDeclarations(ret);
-
+ weaveInterTypeDeclarations(ret);
return ret;
} finally {
- inBinaryTypeCreation = false;
- if (!pendingTypesToFinish.isEmpty()) {
- for (Iterator i = pendingTypesToFinish.iterator(); i.hasNext(); ) {
- weaveInterTypeDeclarations((BinaryTypeBinding)i.next());
+ inBinaryTypeCreationAndWeaving = false;
+
+ // Start processing the list...
+ if (pendingTypesToFinish.size()>0) {
+ processingTheQueue = true;
+ while (!pendingTypesToFinish.isEmpty()) {
+ BinaryTypeBinding nextVictim = (BinaryTypeBinding)pendingTypesToFinish.remove(0);
+ // During this call we may recurse into this method and add
+ // more entries to the pendingTypesToFinish list.
+ weaveInterTypeDeclarations(nextVictim);
}
- pendingTypesToFinish.clear();
+ processingTheQueue = false;
}
}
}