aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.matcher/src/main/java/org/aspectj/weaver/CrosscuttingMembers.java
diff options
context:
space:
mode:
authorAndrey Turbanov <turbanoff@gmail.com>2022-02-26 14:17:56 +0300
committerAndrey Turbanov <turbanoff@gmail.com>2022-02-26 14:17:56 +0300
commit2301b3677678e86673ebd0cbe7bb9740ebfba84a (patch)
treef5ce0e965cfd718811a8f4e4d54b622a566233ba /org.aspectj.matcher/src/main/java/org/aspectj/weaver/CrosscuttingMembers.java
parent102e0617a4bbcf0bd232b4f64995161db8681099 (diff)
downloadaspectj-2301b3677678e86673ebd0cbe7bb9740ebfba84a.tar.gz
aspectj-2301b3677678e86673ebd0cbe7bb9740ebfba84a.zip
Cleanup redundant type casts, due to too weak variable type declaration
Diffstat (limited to 'org.aspectj.matcher/src/main/java/org/aspectj/weaver/CrosscuttingMembers.java')
-rw-r--r--org.aspectj.matcher/src/main/java/org/aspectj/weaver/CrosscuttingMembers.java22
1 files changed, 6 insertions, 16 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 98480f661..6bfd8a897 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
@@ -343,25 +343,15 @@ public class CrosscuttingMembers {
Set<Object> theseTypeMungers = new HashSet<>();
Set<Object> otherTypeMungers = new HashSet<>();
if (!careAboutShadowMungers) {
- for (Object o : typeMungers) {
- if (o instanceof ConcreteTypeMunger) {
- ConcreteTypeMunger typeMunger = (ConcreteTypeMunger) o;
- if (!typeMunger.existsToSupportShadowMunging()) {
- theseTypeMungers.add(typeMunger);
- }
- } else {
- theseTypeMungers.add(o);
+ for (ConcreteTypeMunger typeMunger : typeMungers) {
+ if (!typeMunger.existsToSupportShadowMunging()) {
+ theseTypeMungers.add(typeMunger);
}
}
- for (Object o : other.typeMungers) {
- if (o instanceof ConcreteTypeMunger) {
- ConcreteTypeMunger typeMunger = (ConcreteTypeMunger) o;
- if (!typeMunger.existsToSupportShadowMunging()) {
- otherTypeMungers.add(typeMunger);
- }
- } else {
- otherTypeMungers.add(o);
+ for (ConcreteTypeMunger typeMunger : other.typeMungers) {
+ if (!typeMunger.existsToSupportShadowMunging()) {
+ otherTypeMungers.add(typeMunger);
}
}
} else {