You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2023/09/04 14:33:00 UTC

[jira] [Closed] (GROOVY-7667) AnnotationCollector should disregard @Target and @Retention

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

Eric Milles closed GROOVY-7667.
-------------------------------
    Resolution: Information Provided

> AnnotationCollector should disregard @Target and @Retention
> -----------------------------------------------------------
>
>                 Key: GROOVY-7667
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7667
>             Project: Groovy
>          Issue Type: Improvement
>    Affects Versions: 2.4.5
>            Reporter: Christopher Smith
>            Priority: Minor
>              Labels: annotations
>
> I attempted to set up an annotation-inheritance situation using {{@AnnotationCollector}}, and I wrote the intermediate collector in Java. Since the intermediate collector was applied to my leaf collector, I put {{@Target(ElementType.ANNOTATION_TYPE)}} on the intermediate collector, but it appears that Groovy copied that annotation to the final target class, where it wasn't allowed and produced a compiler error.
> I suggest that {{@Target}} and {{@Retention}} should be specifically ignored when added to a collector annotation.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)