From 697e4591af586ab7eda67ba3bc6e028fb16445ee Mon Sep 17 00:00:00 2001 From: Daniel Sun Date: Sun, 25 Aug 2024 02:27:42 +0800 Subject: [PATCH] Trivial refactor: reuse `hasAnnotation` --- .../java/org/apache/groovy/ast/tools/AnnotatedNodeUtils.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/org/apache/groovy/ast/tools/AnnotatedNodeUtils.java b/src/main/java/org/apache/groovy/ast/tools/AnnotatedNodeUtils.java index 04e3d3618f8..2bbd0092a6e 100644 --- a/src/main/java/org/apache/groovy/ast/tools/AnnotatedNodeUtils.java +++ b/src/main/java/org/apache/groovy/ast/tools/AnnotatedNodeUtils.java @@ -52,7 +52,6 @@ public static boolean hasAnnotation(final AnnotatedNode node, final ClassNode an } public static boolean isGenerated(final AnnotatedNode node) { - List annots = node.getAnnotations(GENERATED_TYPE); - return (annots != null && !annots.isEmpty()); + return hasAnnotation(node, GENERATED_TYPE); } }