You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2020/02/19 05:12:22 UTC

[groovy] branch GROOVY_2_5_X updated: GROOVY-9185: groovyc doesn't keep RetentionPolicy in generated bytecode (port to 2_5_X)

This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_2_5_X
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/GROOVY_2_5_X by this push:
     new 6b82b32  GROOVY-9185: groovyc doesn't keep RetentionPolicy in generated bytecode (port to 2_5_X)
6b82b32 is described below

commit 6b82b32bcbe5066759cd00153f82f0d7c48da7f8
Author: Paul King <pa...@asert.com.au>
AuthorDate: Mon Feb 17 23:34:41 2020 +1000

    GROOVY-9185: groovyc doesn't keep RetentionPolicy in generated bytecode (port to 2_5_X)
---
 src/main/java/org/codehaus/groovy/vmplugin/v5/Java5.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/codehaus/groovy/vmplugin/v5/Java5.java b/src/main/java/org/codehaus/groovy/vmplugin/v5/Java5.java
index aa5a7d9..70d487c 100644
--- a/src/main/java/org/codehaus/groovy/vmplugin/v5/Java5.java
+++ b/src/main/java/org/codehaus/groovy/vmplugin/v5/Java5.java
@@ -253,7 +253,9 @@ public class Java5 implements VMPlugin {
         for (AnnotationNode an : annotations) {
             plugin.configureAnnotationNodeFromDefinition(an, node);
         }
-        plugin.configureAnnotationNodeFromDefinition(node, node);
+        if (!node.getClassNode().getName().equals("java.lang.annotation.Retention")) {
+            plugin.configureAnnotationNodeFromDefinition(node, node);
+        }
     }
 
     private void configureAnnotation(AnnotationNode node, Annotation annotation) {