From a0bcb6ba4b4b81eef4fc95d949cd81538b17aa8f Mon Sep 17 00:00:00 2001 From: Alexander Kriegisch Date: Mon, 9 Jan 2023 17:59:20 +0100 Subject: 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 --- .../src/main/java/org/aspectj/weaver/patterns/WildTypePattern.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'org.aspectj.matcher') 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; } } -- cgit v1.2.3