aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.matcher/src/main/java/org/aspectj/weaver
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 /org.aspectj.matcher/src/main/java/org/aspectj/weaver
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 'org.aspectj.matcher/src/main/java/org/aspectj/weaver')
-rw-r--r--org.aspectj.matcher/src/main/java/org/aspectj/weaver/CrosscuttingMembers.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/CrosscuttingMembers.java b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/CrosscuttingMembers.java
index c3f22b0b1..d380e988e 100644
--- a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/CrosscuttingMembers.java
+++ b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/CrosscuttingMembers.java
@@ -293,8 +293,7 @@ public class CrosscuttingMembers {
theseShadowMungers.add(munger);
}
}
- Set<ShadowMunger> tempSet = new HashSet<>();
- tempSet.addAll(other.shadowMungers);
+ Set<ShadowMunger> tempSet = new HashSet<>(other.shadowMungers);
Set<ShadowMunger> otherShadowMungers = new HashSet<>();
Set<ShadowMunger> otherInlinedAroundMungers = new HashSet<>();
for (ShadowMunger munger : tempSet) {