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:07:00 UTC

[jira] [Resolved] (GROOVY-9095) Default retention policy not implemented for annotation

     [ https://issues.apache.org/jira/browse/GROOVY-9095?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul King resolved GROOVY-9095.
-------------------------------
       Resolution: Fixed
         Assignee: Paul King
    Fix Version/s: 2.5.7
                   3.0.0-beta-1

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)