aboutsummaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authormwebster <mwebster>2006-08-24 17:32:00 +0000
committermwebster <mwebster>2006-08-24 17:32:00 +0000
commit04fa1dcce12934cc5cfe1e5e8b66523c10e93672 (patch)
tree1e8d4eca711228fbc0fd1cc21fe958fdd1f77e54 /weaver
parent137ce3fd3c106581c35b3eba6f2e95612a34046a (diff)
downloadaspectj-04fa1dcce12934cc5cfe1e5e8b66523c10e93672.tar.gz
aspectj-04fa1dcce12934cc5cfe1e5e8b66523c10e93672.zip
Bug 129525 "Don't Dump Bytecodes to Syserr in LTW" (don't throw AbortException in LTW message handler)
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java b/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
index b1adcfb8f..26244e2a0 100644
--- a/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
+++ b/weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java
@@ -80,6 +80,7 @@ public class WeavingAdaptor implements IMessageContext {
protected BcelWeaver weaver;
private IMessageHandler messageHandler;
private WeavingAdaptorMessageHandler messageHolder;
+ private boolean abortOnError = false;
protected GeneratedClassHandler generatedClassHandler;
protected Map generatedClasses = new HashMap(); /* String -> UnwovenClassFile */
protected BcelObjectType delegateForCurrentClass; // lazily initialized, should be used to prevent parsing bytecode multiple times
@@ -153,6 +154,7 @@ public class WeavingAdaptor implements IMessageContext {
}
private void init(List classPath, List aspectPath) {
+ abortOnError = true;
createMessageHandler();
info("using classpath: " + classPath);
@@ -191,8 +193,12 @@ public class WeavingAdaptor implements IMessageContext {
}
protected void disable () {
+ if (trace.isTraceEnabled()) trace.enter("disable",this);
+
enabled = false;
messageHolder.flushMessages();
+
+ if (trace.isTraceEnabled()) trace.exit("disable");
}
protected boolean isEnabled () {
@@ -469,7 +475,7 @@ public class WeavingAdaptor implements IMessageContext {
if (traceMessages) traceMessage(message);
if (accumulating) {
boolean result = addMessage(message);
- if (0 <= message.getKind().compareTo(IMessage.ERROR)) {
+ if (abortOnError && 0 <= message.getKind().compareTo(IMessage.ERROR)) {
throw new AbortException(message);
}
return result;
@@ -553,7 +559,7 @@ public class WeavingAdaptor implements IMessageContext {
public boolean handleMessage(IMessage message) throws AbortException {
boolean result = super.handleMessage(message);
- if (0 <= message.getKind().compareTo(failKind)) {
+ if (abortOnError && 0 <= message.getKind().compareTo(failKind)) {
throw new AbortException(message);
}
return true;