From: aclement Date: Sat, 3 May 2008 02:55:26 +0000 (+0000) Subject: 210470: remove thread reference stored in CompilationAndWeavingContext static - it... X-Git-Tag: Root_refactoring~12 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=45d16bebca01d960ad556cac7c762578badea50f;p=aspectj.git 210470: remove thread reference stored in CompilationAndWeavingContext static - it anchors the context class loader --- diff --git a/loadtime/src/org/aspectj/weaver/loadtime/Aj.java b/loadtime/src/org/aspectj/weaver/loadtime/Aj.java index b810a9078..732bd534d 100644 --- a/loadtime/src/org/aspectj/weaver/loadtime/Aj.java +++ b/loadtime/src/org/aspectj/weaver/loadtime/Aj.java @@ -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 } }