]> source.dussan.org Git - aspectj.git/commit
Redundant Collection.addAll() call
authorLars Grefer <eclipse@larsgrefer.de>
Sat, 15 Aug 2020 14:33:00 +0000 (16:33 +0200)
committerLars Grefer <eclipse@larsgrefer.de>
Sat, 15 Aug 2020 14:36:00 +0000 (16:36 +0200)
commit2409bcbc7c9606b055e23f52d688eecda84351d6
treee775e9d0e033ec563236c31623f66d023c40aac5
parent3641f1626df6b9b1c11dd3f16b01a01495f4662d
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>
28 files changed:
ajde.core/src/main/java/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java
ajde.core/src/test/java/org/aspectj/ajde/core/tests/ShowWeaveMessagesTest.java
bcel-builder/src/main/java/org/aspectj/apache/bcel/generic/InstructionHandle.java
build/src/main/java/org/aspectj/internal/tools/ant/taskdefs/Checklics.java
build/src/main/java/org/aspectj/internal/tools/build/SampleGatherer.java
org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/ajc/BuildArgParser.java
org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AjBuildConfig.java
org.aspectj.ajdt.core/src/test/java/org/aspectj/ajdt/internal/compiler/batch/IncrementalCase.java
org.aspectj.matcher/src/main/java/org/aspectj/weaver/CrosscuttingMembers.java
org.aspectj.matcher/src/test/java/org/aspectj/weaver/patterns/ParserTestCase.java
taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/AjcTask.java
taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/compilers/Ajc.java
testing-drivers/src/test/java/org/aspectj/testing/drivers/Harness.java
testing/src/test/java/org/aspectj/testing/OutputSpec.java
testing/src/test/java/org/aspectj/testing/harness/bridge/JavaRun.java
testing/src/test/java/org/aspectj/testing/util/FileUtil.java
testing/src/test/java/org/aspectj/testing/util/LangUtil.java
testing/src/test/java/org/aspectj/testing/util/LangUtilTest.java
testing/src/test/java/org/aspectj/testing/util/MessageUtilTest.java
testing/src/test/java/org/aspectj/testing/util/TestDiffs.java
tests/src/test/java/org/aspectj/systemtest/model/ModelTestCase.java
util/src/main/java/org/aspectj/util/LangUtil.java
util/src/test/java/org/aspectj/util/FileUtilTest.java
weaver/src/main/java/org/aspectj/weaver/bcel/BcelClassWeaver.java
weaver/src/test/java/org/aspectj/weaver/ReferenceTypeTestCase.java
weaver/src/test/java/org/aspectj/weaver/bcel/AroundWeaveTestCase.java
weaver/src/test/java/org/aspectj/weaver/tools/Java15PointcutExpressionTest.java