diff options
author | Alexander Kriegisch <Alexander@Kriegisch.name> | 2023-01-09 17:59:20 +0100 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2023-01-15 14:41:51 +0100 |
commit | a0bcb6ba4b4b81eef4fc95d949cd81538b17aa8f (patch) | |
tree | 649f49ae7110bb2c7b1501d35ab065da5f7594fc | |
parent | 5a8cdee463d63f9f3eaf0a40dff26a54a814121c (diff) | |
download | aspectj-a0bcb6ba4b4b81eef4fc95d949cd81538b17aa8f.tar.gz aspectj-a0bcb6ba4b4b81eef4fc95d949cd81538b17aa8f.zip |
Simplify if-else in WildTypePattern.matchesExactlyByName
A simple boolean condition is enough.
Loosely relates to https://github.com/eclipse/org.aspectj/issues/24, but
actually it is just drive-by cosmetics.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
-rw-r--r-- | org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/WildTypePattern.java | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/WildTypePattern.java b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/WildTypePattern.java index 9c6a62a5f..37653a9cc 100644 --- a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/WildTypePattern.java +++ b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/WildTypePattern.java @@ -326,11 +326,7 @@ public class WildTypePattern extends TypePattern { numDimensionsInTargetType++; targetTypeName = targetTypeName.substring(index + 1); } - if (numDimensionsInTargetType == dim) { - return true; - } else { - return false; - } + return numDimensionsInTargetType == dim; } } |