aboutsummaryrefslogtreecommitdiffstats
path: root/testing-drivers
diff options
context:
space:
mode:
authorLars Grefer <eclipse@larsgrefer.de>2020-08-15 16:33:00 +0200
committerLars Grefer <eclipse@larsgrefer.de>2020-08-15 16:36:00 +0200
commit2409bcbc7c9606b055e23f52d688eecda84351d6 (patch)
treee775e9d0e033ec563236c31623f66d023c40aac5 /testing-drivers
parent3641f1626df6b9b1c11dd3f16b01a01495f4662d (diff)
downloadaspectj-2409bcbc7c9606b055e23f52d688eecda84351d6.tar.gz
aspectj-2409bcbc7c9606b055e23f52d688eecda84351d6.zip
Redundant Collection.addAll() call
Reports Collection.addAll() and Map.putAll() calls after instantiation of a collection using a constructor call without arguments. Such constructs can be replaced with a single call to a parametrized constructor which simplifies code. Also for some collections the replacement might be more performant. Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
Diffstat (limited to 'testing-drivers')
-rw-r--r--testing-drivers/src/test/java/org/aspectj/testing/drivers/Harness.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/testing-drivers/src/test/java/org/aspectj/testing/drivers/Harness.java b/testing-drivers/src/test/java/org/aspectj/testing/drivers/Harness.java
index 55295568a..42f4c4451 100644
--- a/testing-drivers/src/test/java/org/aspectj/testing/drivers/Harness.java
+++ b/testing-drivers/src/test/java/org/aspectj/testing/drivers/Harness.java
@@ -213,8 +213,7 @@ public class Harness {
// read arguments
final ArrayList<String> globals = new ArrayList<>();
final ArrayList<String> files = new ArrayList<>();
- final LinkedList<String> argList = new LinkedList<>();
- argList.addAll(Arrays.asList(args));
+ final LinkedList<String> argList = new LinkedList<>(Arrays.asList(args));
for (int i = 0; i < argList.size(); i++) {
String arg = argList.get(i);
List<String> aliases = aliasOptions(arg);