You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2024/08/24 18:28:31 UTC
(groovy) branch GROOVY_4_0_X updated: Trivial refactor: reuse `hasAnnotation`
This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/GROOVY_4_0_X by this push:
new 1af63ebd22 Trivial refactor: reuse `hasAnnotation`
1af63ebd22 is described below
commit 1af63ebd226982658fc99c2ef350498c9a585683
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sun Aug 25 02:27:42 2024 +0800
Trivial refactor: reuse `hasAnnotation`
---
src/main/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 04e3d3618f..2bbd0092a6 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 class AnnotatedNodeUtils {
}
public static boolean isGenerated(final AnnotatedNode node) {
- List<?> annots = node.getAnnotations(GENERATED_TYPE);
- return (annots != null && !annots.isEmpty());
+ return hasAnnotation(node, GENERATED_TYPE);
}
}