aboutsummaryrefslogtreecommitdiffstats
path: root/loadtime
diff options
context:
space:
mode:
authoracolyer <acolyer>2005-11-04 09:03:45 +0000
committeracolyer <acolyer>2005-11-04 09:03:45 +0000
commita3e8bb5c97809d468330a566d7e548a68b222ad3 (patch)
tree7c220befcc456db94312b9f0b728330d3ae815d8 /loadtime
parentcea5fc1169f1052878f40da0bdc24fd02b02258a (diff)
downloadaspectj-a3e8bb5c97809d468330a566d7e548a68b222ad3.tar.gz
aspectj-a3e8bb5c97809d468330a566d7e548a68b222ad3.zip
autodetect java version and configure world accordingly (now that aj is stricter about not allowing java 5 features at < 1.5 level, this was needed for some LTW tests to pass too)
Diffstat (limited to 'loadtime')
-rw-r--r--loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
index b160e4960..b3bbcbc1b 100644
--- a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
+++ b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java
@@ -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;