diff options
author | Andrey Turbanov <turbanoff@gmail.com> | 2022-04-17 16:07:57 +0300 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2022-04-17 22:03:57 +0700 |
commit | 816f585d541f51ab106d67a617cbb01f52169fb0 (patch) | |
tree | 5d75bd4e6a681726d36e1ee7c805f15704578c2a /org.aspectj.matcher/src | |
parent | 57dd44a35a6a60aae5576cbd35c110ae82505dac (diff) | |
download | aspectj-816f585d541f51ab106d67a617cbb01f52169fb0.tar.gz aspectj-816f585d541f51ab106d67a617cbb01f52169fb0.zip |
Cleanup redundant null check before instanceof
Diffstat (limited to 'org.aspectj.matcher/src')
-rw-r--r-- | org.aspectj.matcher/src/main/java/org/aspectj/weaver/CrosscuttingMembers.java | 2 | ||||
-rw-r--r-- | org.aspectj.matcher/src/main/java/org/aspectj/weaver/PerObjectInterfaceTypeMunger.java | 2 |
2 files changed, 2 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 17472ee6b..d6acdefd9 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 @@ -188,7 +188,7 @@ public class CrosscuttingMembers { String signatureToLookFor = typeToExpose.getSignature(); for (ConcreteTypeMunger cTM : typeMungers) { ResolvedTypeMunger rTM = cTM.getMunger(); - if (rTM != null && rTM instanceof ExposeTypeMunger) { + if (rTM instanceof ExposeTypeMunger) { String exposedType = ((ExposeTypeMunger) rTM).getExposedTypeSignature(); if (exposedType.equals(signatureToLookFor)) { return; // dont need to bother diff --git a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/PerObjectInterfaceTypeMunger.java b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/PerObjectInterfaceTypeMunger.java index 507717721..822539074 100644 --- a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/PerObjectInterfaceTypeMunger.java +++ b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/PerObjectInterfaceTypeMunger.java @@ -27,7 +27,7 @@ public class PerObjectInterfaceTypeMunger extends ResolvedTypeMunger { private TypePattern lazyTestTypePattern; public boolean equals(Object other) { - if (other == null || !(other instanceof PerObjectInterfaceTypeMunger)) { + if (!(other instanceof PerObjectInterfaceTypeMunger)) { return false; } PerObjectInterfaceTypeMunger o = (PerObjectInterfaceTypeMunger) other; |