From 639f5030e0391e831138f9786cf831c3374449e7 Mon Sep 17 00:00:00 2001 From: Lars Grefer Date: Sat, 15 Aug 2020 17:01:46 +0200 Subject: Weaken Collection declarations Reports on declarations of Collection variables made by using the collection class as the type, rather than an appropriate interface. Signed-off-by: Lars Grefer --- taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/AjcTask.java | 2 +- .../java/org/aspectj/tools/ant/taskdefs/Ajc11CompilerAdapterTest.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'taskdefs') 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 c6ebb14b3..c055290ae 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 @@ -2037,7 +2037,7 @@ public class AjcTask extends MatchingTask { // } List extractArguments() { - ArrayList result = new ArrayList(); + List result = new ArrayList(); String[] cmds = command.getArguments(); if (!LangUtil.isEmpty(cmds)) { result.addAll(Arrays.asList(cmds)); diff --git a/taskdefs/src/test/java/org/aspectj/tools/ant/taskdefs/Ajc11CompilerAdapterTest.java b/taskdefs/src/test/java/org/aspectj/tools/ant/taskdefs/Ajc11CompilerAdapterTest.java index 80e9ed4a0..3a5f3b954 100644 --- a/taskdefs/src/test/java/org/aspectj/tools/ant/taskdefs/Ajc11CompilerAdapterTest.java +++ b/taskdefs/src/test/java/org/aspectj/tools/ant/taskdefs/Ajc11CompilerAdapterTest.java @@ -20,6 +20,7 @@ import org.aspectj.util.FileUtil; import java.io.File; import java.util.ArrayList; import java.util.Iterator; +import java.util.List; import junit.framework.TestCase; @@ -28,7 +29,7 @@ import junit.framework.TestCase; */ public class Ajc11CompilerAdapterTest extends TestCase { public static boolean LOGGING = false; - ArrayList tempFiles = new ArrayList(); + List tempFiles = new ArrayList(); public Ajc11CompilerAdapterTest(String name) { super(name); -- cgit v1.2.3