]> source.dussan.org Git - aspectj.git/commitdiff
autodetect java version and configure world accordingly (now that aj is stricter...
authoracolyer <acolyer>
Fri, 4 Nov 2005 09:03:45 +0000 (09:03 +0000)
committeracolyer <acolyer>
Fri, 4 Nov 2005 09:03:45 +0000 (09:03 +0000)
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java

index b160e496007d1409e16192f321490b87f8d21a37..b3bbcbc1b5a94ad183168ace9cc11b5471704e08 100644 (file)
@@ -17,6 +17,7 @@ import org.aspectj.bridge.IMessage;
 import org.aspectj.bridge.ISourceLocation;
 import org.aspectj.bridge.Message;
 import org.aspectj.bridge.MessageUtil;
+import org.aspectj.util.LangUtil;
 import org.aspectj.weaver.ICrossReferenceHandler;
 import org.aspectj.weaver.ResolvedType;
 import org.aspectj.weaver.UnresolvedType;
@@ -202,7 +203,9 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor {
         world.setPinpointMode(weaverOption.pinpoint);
         weaver.setReweavableMode(weaverOption.notReWeavable);
         world.setXnoInline(weaverOption.noInline);
-        world.setBehaveInJava5Way(weaverOption.java5);//TODO should be autodetected ?
+        //world.setBehaveInJava5Way(weaverOption.java5);//TODO should be autodetected ?
+        // AMC - autodetect as per line below, needed for AtAjLTWTests.testLTWUnweavable
+        world.setBehaveInJava5Way(LangUtil.is15VMOrGreater());
         //-Xlintfile: first so that lint wins
         if (weaverOption.lintFile != null) {
             InputStream resource = null;