You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2019/04/28 09:09:00 UTC
[jira] [Comment Edited] (GROOVY-9095) Default retention policy not
implemented for annotation
[ https://issues.apache.org/jira/browse/GROOVY-9095?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16827865#comment-16827865 ]
Paul King edited comment on GROOVY-9095 at 4/28/19 9:08 AM:
------------------------------------------------------------
Proposed PR merged. Thanks for spotting the issue!
was (Author: paulk):
Proposed PR merged.
> Default retention policy not implemented for annotation
> -------------------------------------------------------
>
> Key: GROOVY-9095
> URL: https://issues.apache.org/jira/browse/GROOVY-9095
> Project: Groovy
> Issue Type: Bug
> Components: Compiler
> Affects Versions: 2.5.6
> Reporter: Eric Milles
> Assignee: Paul King
> Priority: Major
> Fix For: 3.0.0-beta-1, 2.5.7
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Consider the following:
> Anno.java
> {code:java}
> public @interface Anno {}
> {code}
> Pogo.groovy
> {code:groovy}
> @Anno public class Pogo {}
> {code}
> Pojo.java
> {code:java}
> @Anno public class Pojo {}
> {code}
> When compiled, Pogo lacks the annotation in its class file.
> {code}
> // Compiled from Pogo.groovy (version 1.8 : 52.0, super bit)
> public class Pogo implements groovy.lang.GroovyObject {
> {code}
> vs.
> {code}
> // Compiled from Pojo.java (version 1.8 : 52.0, super bit)
> @Anno
> public class Pojo {
> {code}
> The default for an annotation that lacks an {{@Retention}} annotation is {{@Retention(RetentionPolicy.CLASS)}}.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)