diff options
author | mwebster <mwebster> | 2006-10-05 10:13:54 +0000 |
---|---|---|
committer | mwebster <mwebster> | 2006-10-05 10:13:54 +0000 |
commit | c315f9d9a754d01ea608d6d1ae020889d4018fc6 (patch) | |
tree | f64fe7729bbe5e5dc2f8bfd6ecfccecd10118a89 /weaver | |
parent | 3ebee688f8dab9c114ca61b685b324c19640ae9b (diff) | |
download | aspectj-c315f9d9a754d01ea608d6d1ae020889d4018fc6.tar.gz aspectj-c315f9d9a754d01ea608d6d1ae020889d4018fc6.zip |
Bug 158957 "NPE in LTW with RMI dynamic proxies w/ pointcut reuse" (restore catch(Throwable) in Aj.preProcess() and make adaptor disabled by default)
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java b/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java index 7d52c3afa..0d0420132 100644 --- a/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java +++ b/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java @@ -74,7 +74,7 @@ public class WeavingAdaptor implements IMessageContext { public static final String SHOW_WEAVE_INFO_PROPERTY = "org.aspectj.weaver.showWeaveInfo"; public static final String TRACE_MESSAGES_PROPERTY = "org.aspectj.tracing.messages"; - private boolean enabled = true; + private boolean enabled = false; protected boolean verbose = getVerbose(); protected BcelWorld bcelWorld; protected BcelWeaver weaver; @@ -169,6 +169,8 @@ public class WeavingAdaptor implements IMessageContext { weaver = new BcelWeaver(bcelWorld); registerAspectLibraries(aspectPath); + + enabled = true; } protected void createMessageHandler() { @@ -201,6 +203,11 @@ public class WeavingAdaptor implements IMessageContext { if (trace.isTraceEnabled()) trace.exit("disable"); } + protected void enable () { + enabled = true; + messageHolder.flushMessages(); + } + protected boolean isEnabled () { return enabled; } @@ -227,6 +234,8 @@ public class WeavingAdaptor implements IMessageContext { * @exception IOException weave failed */ public byte[] weaveClass (String name, byte[] bytes) throws IOException { + if (trace.isTraceEnabled()) trace.enter("weaveClass",this,new Object[] {name, bytes}); + if (enabled) { try { delegateForCurrentClass=null; @@ -258,6 +267,7 @@ public class WeavingAdaptor implements IMessageContext { } } + if (trace.isTraceEnabled()) trace.exit("weaveClass",bytes); return bytes; } |