]> source.dussan.org Git - aspectj.git/commitdiff
Add checking for env variable ASPECTJ_OPTS in addition to sys prop
authorAndy Clement <aclement@pivotal.io>
Mon, 12 Mar 2018 15:37:38 +0000 (08:37 -0700)
committerAndy Clement <aclement@pivotal.io>
Mon, 12 Mar 2018 15:37:38 +0000 (08:37 -0700)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/ConfigParser.java

index 4c7873df02b8e323d251c7668a7e38c40da5a9b3..1bbd3327b73c6dbfa3d3414f03d5609447279982 100644 (file)
@@ -45,7 +45,15 @@ public class ConfigParser {
                for (int i = 0; i < argsArray.length; i++) {
                        args.add(new Arg(argsArray[i], location));
                }
-               String aspectjOptions = System.getProperty("ASPECTJ_OPTS");
+               String aspectjOptions = null;
+               try {
+                       aspectjOptions = System.getenv("ASPECTJ_OPTS");
+                       if (aspectjOptions == null) {
+                               aspectjOptions = System.getProperty("ASPECTJ_OPTS");
+                       }
+               } catch (Throwable t) {
+                       aspectjOptions = null;
+               }
                if (aspectjOptions != null) {
                        StringTokenizer st = new StringTokenizer(aspectjOptions);
                        while (st.hasMoreElements()) {