From f8d82161e3b5c5ddcc6ec16540c3e1ab637bd04c Mon Sep 17 00:00:00 2001 From: Andy Clement Date: Mon, 12 Mar 2018 08:37:38 -0700 Subject: Add checking for env variable ASPECTJ_OPTS in addition to sys prop --- .../src/org/aspectj/ajdt/ajc/ConfigParser.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'org.aspectj.ajdt.core') diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/ConfigParser.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/ConfigParser.java index 4c7873df0..1bbd3327b 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/ConfigParser.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/ConfigParser.java @@ -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()) { -- cgit v1.2.3