]> source.dussan.org Git - aspectj.git/commitdiff
210470: remove thread reference stored in CompilationAndWeavingContext static - it...
authoraclement <aclement>
Sat, 3 May 2008 02:55:26 +0000 (02:55 +0000)
committeraclement <aclement>
Sat, 3 May 2008 02:55:26 +0000 (02:55 +0000)
loadtime/src/org/aspectj/weaver/loadtime/Aj.java

index b810a9078dd2e25b558971725db97166884c643f..732bd534d54690f80ad17938a10fd9c3509ab8f1 100644 (file)
@@ -14,6 +14,7 @@ package org.aspectj.weaver.loadtime;
 import java.util.Map;
 import java.util.WeakHashMap;
 
+import org.aspectj.bridge.context.CompilationAndWeavingContext;
 import org.aspectj.weaver.Dump;
 import org.aspectj.weaver.tools.Trace;
 import org.aspectj.weaver.tools.TraceFactory;
@@ -89,6 +90,8 @@ public class Aj implements ClassPreProcessor {
             // would make sense at least in test f.e. see TestHelper.handleMessage()
                if (trace.isTraceEnabled()) trace.exit("preProcess",th);
             return bytes;
+        } finally {
+            CompilationAndWeavingContext.resetForThread(); // recording the thread will anchor the classloader
         }
     }