Project: AspectJ
Bug 62227 Load Time Weaving aborts on any kind of warning (declare/xlint)
Reported: 2004-05-14 05:34:16 | Status: resolved fixed

The message handler in the weaving adapter for load time weaving says: public boolean handleMessage(IMessage message) throws AbortException { if (!isIgnoring(message.getKind())) { if (verbose) System.err.println(message.getMessage()); throw new AbortException(message); } return true; } This means for warnings it goes bang. So, even a declare warning that is meant to tell the user something informational during a LTW will cause the code to blow up. The fix is straightforward and simply to log warning messages and only fail for error messages. I am waiting for a testcase from Matthew before checking in the fix.

Files changed in fix:
org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/compiler/batch/BcweaverJarMaker.java weaver/src/org/aspectj/weaver/WeavingURLClassLoader.java weaver/src/org/aspectj/weaver/tools/WeavingAdaptor.java weaver/testsrc/org/aspectj/weaver/WeavingURLClassLoaderTest.java