aboutsummaryrefslogtreecommitdiffstats
path: root/taskdefs/src
diff options
context:
space:
mode:
Diffstat (limited to 'taskdefs/src')
-rw-r--r--taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/AjcTask.java3
-rw-r--r--taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/compilers/Ajc.java3
2 files changed, 2 insertions, 4 deletions
diff --git a/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/AjcTask.java b/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/AjcTask.java
index 83dcd9911..c6ebb14b3 100644
--- a/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/AjcTask.java
+++ b/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/AjcTask.java
@@ -1159,7 +1159,6 @@ public class AjcTask extends MatchingTask {
// package-private for testing
String[] makeCommand() {
- ArrayList result = new ArrayList();
if (0 < ignored.size()) {
for (Object o : ignored) {
logVerbose("ignored: " + o);
@@ -1182,7 +1181,7 @@ public class AjcTask extends MatchingTask {
outjarFixedup = true;
}
- result.addAll(cmd.extractArguments());
+ ArrayList result = new ArrayList(cmd.extractArguments());
addListArgs(result);
String[] command = (String[]) result.toArray(new String[0]);
diff --git a/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/compilers/Ajc.java b/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/compilers/Ajc.java
index 25128bb61..43125a862 100644
--- a/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/compilers/Ajc.java
+++ b/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/compilers/Ajc.java
@@ -53,8 +53,7 @@ public class Ajc extends DefaultCompilerAdapter {
"-encoding", "-target" });
private static List<String> finalList(String[] args) {
- List<String> result = new ArrayList<>();
- result.addAll(Arrays.asList(args));
+ List<String> result = new ArrayList<>(Arrays.asList(args));
return Collections.unmodifiableList(result);
}