aboutsummaryrefslogtreecommitdiffstats
path: root/taskdefs
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2018-02-14 14:04:41 -0800
committerAndy Clement <aclement@pivotal.io>2018-02-14 14:04:41 -0800
commit323a9c2b24df0aa92dc40137de98e106f9dc18ea (patch)
tree6cc5f079d46fbe2c80f979bcc00fc7d26015ce7a /taskdefs
parentcf7484b3d30f12ea64eb2a936e1cbd05f2da8291 (diff)
downloadaspectj-323a9c2b24df0aa92dc40137de98e106f9dc18ea.tar.gz
aspectj-323a9c2b24df0aa92dc40137de98e106f9dc18ea.zip
add generics
Diffstat (limited to 'taskdefs')
-rw-r--r--taskdefs/src/org/aspectj/tools/ant/taskdefs/compilers/Ajc.java28
1 files 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 <b>not</b> ajc.
*/
- final static List javacOnlyFlags
+ final static List<String> javacOnlyFlags
= finalList(new String[] { "-g:none", "-g:lines",
"-g:vars", "-g:source", "-nowarn"});
- final static List javacOnlyArgs
+ final static List<String> javacOnlyArgs
= finalList(new String[] { "-sourcepath",
"-encoding", "-target" });
- private static List finalList(String[] args) {
- List result = new ArrayList();
+ private static List<String> finalList(String[] args) {
+ List<String> result = new ArrayList<String>();
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&quot;
*/
- 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);