diff options
author | Lars Grefer <eclipse@larsgrefer.de> | 2020-08-15 17:01:46 +0200 |
---|---|---|
committer | Lars Grefer <eclipse@larsgrefer.de> | 2020-08-15 17:01:46 +0200 |
commit | 639f5030e0391e831138f9786cf831c3374449e7 (patch) | |
tree | fc4e616cb6df8e73722a6d0cf83a55efd6d87387 /build/src/main | |
parent | 2409bcbc7c9606b055e23f52d688eecda84351d6 (diff) | |
download | aspectj-639f5030e0391e831138f9786cf831c3374449e7.tar.gz aspectj-639f5030e0391e831138f9786cf831c3374449e7.zip |
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 <eclipse@larsgrefer.de>
Diffstat (limited to 'build/src/main')
6 files changed, 10 insertions, 10 deletions
diff --git a/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/Checklics.java b/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/Checklics.java index 5d592243c..e343c9d48 100644 --- a/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/Checklics.java +++ b/build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/Checklics.java @@ -654,7 +654,7 @@ class Header { * * @return true if this line has end-of-comment */ - private static boolean checkLine(String line, ArrayList<String> years) { + private static boolean checkLine(String line, List<String> years) { if ((null == line) || (0 == line.length())) { return false; } diff --git a/build/src/main/java/org/aspectj/internal/tools/build/Builder.java b/build/src/main/java/org/aspectj/internal/tools/build/Builder.java index ac13870c8..fad8b560a 100644 --- a/build/src/main/java/org/aspectj/internal/tools/build/Builder.java +++ b/build/src/main/java/org/aspectj/internal/tools/build/Builder.java @@ -181,7 +181,7 @@ public abstract class Builder { private final File tempDir; - private final ArrayList tempFiles; + private final List tempFiles; private final boolean useEclipseCompiles; @@ -275,7 +275,7 @@ public abstract class Builder { return buildProduct(buildSpec); } Result result = specifyResultFor(buildSpec); - ArrayList<String> errors = new ArrayList<>(); + List<String> errors = new ArrayList<>(); try { return buildAll(result, errors); } finally { @@ -340,7 +340,7 @@ public abstract class Builder { */ protected final boolean buildAll(Result result, List<String> errors) { Result[] buildList = skipUptodate(getAntecedantResults(result)); - ArrayList<String> doneList = new ArrayList<>(); + List<String> doneList = new ArrayList<>(); if ((null != buildList) && (0 < buildList.length)) { if (isLogging()) { handler.log("modules to build: " + Arrays.asList(buildList)); @@ -525,7 +525,7 @@ public abstract class Builder { } protected final boolean buildProductModule(ProductModule module) { - ArrayList<String> errors = new ArrayList<>(); + List<String> errors = new ArrayList<>(); try { Kind productKind = Result.kind(Result.NORMAL, Result.ASSEMBLE); Result result = module.module.getResult(productKind); @@ -543,7 +543,7 @@ public abstract class Builder { * deliverables. */ protected ProductModule[] discoverModules(File productDir, Modules modules) { - final ArrayList<File> found = new ArrayList<>(); + final List<File> found = new ArrayList<>(); FileFilter filter = new FileFilter() {// empty jar files public boolean accept(File file) { if ((null != file) && file.canRead() diff --git a/build/src/main/java/org/aspectj/internal/tools/build/Module.java b/build/src/main/java/org/aspectj/internal/tools/build/Module.java index 3f34b3f5e..9d10e4743 100644 --- a/build/src/main/java/org/aspectj/internal/tools/build/Module.java +++ b/build/src/main/java/org/aspectj/internal/tools/build/Module.java @@ -69,7 +69,7 @@ public class Module { /** @return all source files under srcDir */ private static Iterator<File> sourceFiles(File srcDir) { - ArrayList<File> result = new ArrayList<>(); + List<File> result = new ArrayList<>(); sourceFiles(srcDir, result); return result.iterator(); } diff --git a/build/src/main/java/org/aspectj/internal/tools/build/Result.java b/build/src/main/java/org/aspectj/internal/tools/build/Result.java index 563a6932e..22b92c8af 100644 --- a/build/src/main/java/org/aspectj/internal/tools/build/Result.java +++ b/build/src/main/java/org/aspectj/internal/tools/build/Result.java @@ -217,7 +217,7 @@ public class Result { /** @return List (File) of jar's required */ public List<File> findJarRequirements() { - ArrayList<File> result = new ArrayList<>(); + List<File> result = new ArrayList<>(); Module.doFindJarRequirements(this, result); return result; } diff --git a/build/src/main/java/org/aspectj/internal/tools/build/SampleGatherer.java b/build/src/main/java/org/aspectj/internal/tools/build/SampleGatherer.java index bf9b9aab9..9030bbf77 100644 --- a/build/src/main/java/org/aspectj/internal/tools/build/SampleGatherer.java +++ b/build/src/main/java/org/aspectj/internal/tools/build/SampleGatherer.java @@ -419,7 +419,7 @@ class Samples { } List<Sample> getSortedSamples(Comparator<Sample> comparer) { - ArrayList<Sample> result = new ArrayList<>(samples); + List<Sample> result = new ArrayList<>(samples); result.sort(comparer); return result; } diff --git a/build/src/main/java/org/aspectj/internal/tools/build/Util.java b/build/src/main/java/org/aspectj/internal/tools/build/Util.java index dd393ce45..cd7d6623f 100644 --- a/build/src/main/java/org/aspectj/internal/tools/build/Util.java +++ b/build/src/main/java/org/aspectj/internal/tools/build/Util.java @@ -357,7 +357,7 @@ public class Util { /** unmodifiable list of all valid OSGIBundle Name's */ public static final List<Name> NAMES; static { - ArrayList<Name> names = new ArrayList<>(); + List<Name> names = new ArrayList<>(); names.add(BUNDLE_NAME); names.add(BUNDLE_SYMBOLIC_NAME); names.add(BUNDLE_VERSION); |