diff options
author | aclement <aclement> | 2005-12-06 13:02:38 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-12-06 13:02:38 +0000 |
commit | 1e1bbb3f2e7aab4757d715d76730cb68cceb3b87 (patch) | |
tree | abba06b491b9f90fb43ddb64028ef3d556bab334 /loadtime | |
parent | f40d02927635b6171083229fe6d48f326da06cc7 (diff) | |
download | aspectj-1e1bbb3f2e7aab4757d715d76730cb68cceb3b87.tar.gz aspectj-1e1bbb3f2e7aab4757d715d76730cb68cceb3b87.zip |
fixes for 118715 from Matthew.
Diffstat (limited to 'loadtime')
-rw-r--r-- | loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java index b17392d05..d889fbdc0 100644 --- a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java +++ b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java @@ -25,9 +25,7 @@ import java.util.Properties; import java.util.StringTokenizer; import org.aspectj.asm.IRelationship; -import org.aspectj.bridge.IMessage; import org.aspectj.bridge.ISourceLocation; -import org.aspectj.bridge.Message; import org.aspectj.util.LangUtil; import org.aspectj.weaver.ICrossReferenceHandler; import org.aspectj.weaver.Lint; @@ -220,7 +218,14 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor { world.setXnoInline(weaverOption.noInline); // AMC - autodetect as per line below, needed for AtAjLTWTests.testLTWUnweavable world.setBehaveInJava5Way(LangUtil.is15VMOrGreater()); - //-Xlintfile: first so that lint wins + + /* First load defaults */ + bcelWorld.getLint().loadDefaultProperties(); + + /* Second overlay LTW defaults */ + bcelWorld.getLint().adviceDidNotMatch.setKind(null); + + /* Third load user file using -Xlintfile so that -Xlint wins */ if (weaverOption.lintFile != null) { InputStream resource = null; try { @@ -236,20 +241,20 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor { } } if (failure != null || resource == null) { - world.getMessageHandler().handleMessage(new Message( - "Cannot access resource for -Xlintfile:"+weaverOption.lintFile, - IMessage.WARNING, - failure, - null)); + warn("Cannot access resource for -Xlintfile:"+weaverOption.lintFile,failure); +// world.getMessageHandler().handleMessage(new Message( +// "Cannot access resource for -Xlintfile:"+weaverOption.lintFile, +// IMessage.WARNING, +// failure, +// null)); } } finally { try { resource.close(); } catch (Throwable t) {;} } - } - if (weaverOption.lint == null) { - bcelWorld.getLint().loadDefaultProperties(); - bcelWorld.getLint().adviceDidNotMatch.setKind(IMessage.INFO); - } else { + } + + /* Fourth override with -Xlint */ + if (weaverOption.lint != null) { if (weaverOption.lint.equals("default")) {//FIXME should be AjBuildConfig.AJLINT_DEFAULT but yetanother deps.. bcelWorld.getLint().loadDefaultProperties(); } else { |