diff options
author | aclement <aclement> | 2011-06-20 17:10:01 +0000 |
---|---|---|
committer | aclement <aclement> | 2011-06-20 17:10:01 +0000 |
commit | bb2aea40a61fd4bd91d8a0b67cf7933ee728942e (patch) | |
tree | e9ffa65fff01c692682e0782dd036fbc995dfff0 | |
parent | 7ec1a06529960d5d13a100a393e3245bb85d843d (diff) | |
download | aspectj-bb2aea40a61fd4bd91d8a0b67cf7933ee728942e.tar.gz aspectj-bb2aea40a61fd4bd91d8a0b67cf7933ee728942e.zip |
349764
-rw-r--r-- | org.aspectj.matcher/src/org/aspectj/weaver/World.java | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/World.java b/org.aspectj.matcher/src/org/aspectj/weaver/World.java index f98dd6f94..bde4ae37f 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/World.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/World.java @@ -145,6 +145,7 @@ public abstract class World implements Dump.INode { private boolean completeBinaryTypes = false; private boolean overWeaving = false; + private static boolean systemPropertyOverWeaving = false; public boolean forDEBUG_structuralChangesCode = false; public boolean forDEBUG_bridgingCode = false; public boolean optimizedMatching = true; @@ -163,6 +164,19 @@ public abstract class World implements Dump.INode { */ private List<RuntimeException> dumpState_cantFindTypeExceptions = null; + static { + try { + String value = System.getProperty("aspectj.overweaving", "false"); + if (value.equalsIgnoreCase("true")) { + System.out.println("ASPECTJ: aspectj.overweaving=true: overweaving switched ON"); + systemPropertyOverWeaving = true; + } + } catch (Throwable t) { + System.err.println("ASPECTJ: Unable to read system properties"); + t.printStackTrace(); + } + } + /** * Play God. On the first day, God created the primitive types and put them in the type map. */ @@ -1625,11 +1639,10 @@ public abstract class World implements Dump.INode { } try { - String value = System.getProperty("aspectj.overweaving", "false"); - if (value.equalsIgnoreCase("true")) { - System.out.println("ASPECTJ: aspectj.overweaving=true: overweaving switched ON"); + if (systemPropertyOverWeaving) { overWeaving = true; } + String value = null; value = System.getProperty("aspectj.typeDemotion", "false"); if (value.equalsIgnoreCase("true")) { System.out.println("ASPECTJ: aspectj.typeDemotion=true: type demotion switched ON"); |