From 323a9c2b24df0aa92dc40137de98e106f9dc18ea Mon Sep 17 00:00:00 2001 From: Andy Clement Date: Wed, 14 Feb 2018 14:04:41 -0800 Subject: [PATCH] add generics --- .../tools/ant/taskdefs/compilers/Ajc.java | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/taskdefs/src/org/aspectj/tools/ant/taskdefs/compilers/Ajc.java b/taskdefs/src/org/aspectj/tools/ant/taskdefs/compilers/Ajc.java index b5075227f..690cccf22 100644 --- a/taskdefs/src/org/aspectj/tools/ant/taskdefs/compilers/Ajc.java +++ b/taskdefs/src/org/aspectj/tools/ant/taskdefs/compilers/Ajc.java @@ -12,13 +12,6 @@ package org.aspectj.tools.ant.taskdefs.compilers; -import org.apache.tools.ant.BuildException; -import org.apache.tools.ant.Project; -import org.apache.tools.ant.taskdefs.Javac; -import org.apache.tools.ant.taskdefs.LogOutputStream; -import org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter; -import org.apache.tools.ant.types.Commandline; - import java.io.File; import java.io.PrintStream; import java.util.ArrayList; @@ -26,6 +19,13 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.Project; +import org.apache.tools.ant.taskdefs.Javac; +import org.apache.tools.ant.taskdefs.LogOutputStream; +import org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter; +import org.apache.tools.ant.types.Commandline; + /** * Ajc uses this as the CompilerAdapter. * @@ -45,15 +45,15 @@ public class Ajc extends DefaultCompilerAdapter { /** * List of arguments allowed only by javac and not ajc. */ - final static List javacOnlyFlags + final static List javacOnlyFlags = finalList(new String[] { "-g:none", "-g:lines", "-g:vars", "-g:source", "-nowarn"}); - final static List javacOnlyArgs + final static List javacOnlyArgs = finalList(new String[] { "-sourcepath", "-encoding", "-target" }); - private static List finalList(String[] args) { - List result = new ArrayList(); + private static List finalList(String[] args) { + List result = new ArrayList(); result.addAll(Arrays.asList(args)); return Collections.unmodifiableList(result); } @@ -65,7 +65,8 @@ public class Ajc extends DefaultCompilerAdapter { * @return true if a good compile, false otherwise. * @throws org.apache.tools.ant.BuildException */ - public boolean execute() throws BuildException { + @Override + public boolean execute() throws BuildException { attributes.log("Using AJC", Project.MSG_VERBOSE); return compile(addAjcOptions(setupJavacCommand())); } @@ -185,7 +186,8 @@ public class Ajc extends DefaultCompilerAdapter { * Logs the compilation parameters, adds the files to compile and logs the * &qout;niceSourceList" */ - protected void logAndAddFilesToCompile(Commandline cmd) { + @Override + protected void logAndAddFilesToCompile(Commandline cmd) { // Same behavior as DefaultCompilerAdapter.logAndAddFilesToCompile attributes.log("Compilation args: " + cmd.toString(), Project.MSG_VERBOSE); -- 2.39.5