diff options
author | Andrey Turbanov <turbanoff@gmail.com> | 2022-04-13 13:51:39 +0300 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2022-04-15 11:00:33 +0700 |
commit | 2091b6d1ded90bfeb29f8d74bd17f05ec8fc983d (patch) | |
tree | 4afc936dbc982b72b5dadddafc8360f6c4436be0 /org.aspectj.matcher | |
parent | 047a93c24f4eef3b2ebf254be9332d4340adbd04 (diff) | |
download | aspectj-2091b6d1ded90bfeb29f8d74bd17f05ec8fc983d.tar.gz aspectj-2091b6d1ded90bfeb29f8d74bd17f05ec8fc983d.zip |
Reduce 'Object' class usage
Diffstat (limited to 'org.aspectj.matcher')
-rw-r--r-- | org.aspectj.matcher/src/main/java/org/aspectj/weaver/CrosscuttingMembers.java | 14 | ||||
-rw-r--r-- | org.aspectj.matcher/src/main/java/org/aspectj/weaver/Shadow.java | 4 |
2 files changed, 9 insertions, 9 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 6bfd8a897..17472ee6b 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 @@ -340,8 +340,8 @@ public class CrosscuttingMembers { // if we dont care about shadow mungers then ignore those // typeMungers which are created to help with the implementation // of shadowMungers - Set<Object> theseTypeMungers = new HashSet<>(); - Set<Object> otherTypeMungers = new HashSet<>(); + Set<ConcreteTypeMunger> theseTypeMungers = new HashSet<>(); + Set<ConcreteTypeMunger> otherTypeMungers = new HashSet<>(); if (!careAboutShadowMungers) { for (ConcreteTypeMunger typeMunger : typeMungers) { if (!typeMunger.existsToSupportShadowMunging()) { @@ -367,17 +367,17 @@ public class CrosscuttingMembers { } else { boolean shouldOverwriteThis = false; boolean foundInequality = false; - for (Iterator<Object> iter = theseTypeMungers.iterator(); iter.hasNext() && !foundInequality;) { - Object thisOne = iter.next(); + for (Iterator<ConcreteTypeMunger> iter = theseTypeMungers.iterator(); iter.hasNext() && !foundInequality;) { + ConcreteTypeMunger thisOne = iter.next(); boolean foundInOtherSet = false; - for (Object otherOne : otherTypeMungers) { + for (ConcreteTypeMunger otherOne : otherTypeMungers) { if (thisOne instanceof ConcreteTypeMunger) { - if (((ConcreteTypeMunger) thisOne).shouldOverwrite()) { + if (thisOne.shouldOverwrite()) { shouldOverwriteThis = true; } } if (thisOne instanceof ConcreteTypeMunger && otherOne instanceof ConcreteTypeMunger) { - if (((ConcreteTypeMunger) thisOne).equivalentTo(otherOne)) { + if (thisOne.equivalentTo(otherOne)) { foundInOtherSet = true; } else if (thisOne.equals(otherOne)) { foundInOtherSet = true; diff --git a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/Shadow.java b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/Shadow.java index 320f3d431..f6c7b7bd8 100644 --- a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/Shadow.java +++ b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/Shadow.java @@ -576,8 +576,8 @@ public abstract class Shadow { // Compare every pair of advice mungers for (int i = max - 1; i >= 0; i--) { for (int j = 0; j < i; j++) { - Object a = mungers.get(i); - Object b = mungers.get(j); + ShadowMunger a = mungers.get(i); + ShadowMunger b = mungers.get(j); // Make sure they are the right type if (a instanceof Advice && b instanceof Advice) { |