You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by GitBox <gi...@apache.org> on 2021/02/23 07:36:24 UTC

[GitHub] [groovy] danielsun1106 commented on a change in pull request #1496: GROOVY-6360: move @Pure to separate subproject.

danielsun1106 commented on a change in pull request #1496:
URL: https://github.com/apache/groovy/pull/1496#discussion_r580819038



##########
File path: src/main/java/org/codehaus/groovy/reflection/ReflectionUtils.java
##########
@@ -190,6 +191,15 @@ public static boolean trySetAccessible(final AccessibleObject ao) {
         return false;
     }
 
+    public static boolean hasAnnotationWithSimpleName(AccessibleObject obj, String simpleName) {

Review comment:
       Both `@groovy.annotations.Pure` and `@foo.bar.Pure` have same simple name `Pure`. If user uses `@foo.bar.Pure` to mark methods, which will be treated as "pure" methods too.
   
   So I recommend using full class name instead of simple name.
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org