You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "James Kleeh (Jira)" <ji...@apache.org> on 2020/02/14 18:55:00 UTC
[jira] [Updated] (GROOVY-9399) Annotations on annotation methods
are missing in the AST
[ https://issues.apache.org/jira/browse/GROOVY-9399?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Kleeh updated GROOVY-9399:
--------------------------------
Description:
In Groovy 2.5, the annotation would be found, in Groovy 3 it is not.
Simple example:
{{{{import org.codehaus.groovy.ast.builder.AstBuilder;}}}}
{{ {{import org.codehaus.groovy.ast.*;}}}}
{{{{ASTNode[] nodes = new AstBuilder().buildFromString('''}}}}
{{ {{@interface Foo {}}}}
{{ String value() default ""}}
{{ {{}}}}}
{{{{@interface Bar {}}}}
{{{{@Foo}}}}
{{ String value()}}
{{ {{}}}}}
{{ {{''')}}}}
{{nodes[2].methods[0].getAnnotations()}}
was:
In Groovy 2.5, the annotation would be found, in Groovy 3 it is not.
Simple example:
{{import org.codehaus.groovy.ast.builder.AstBuilder;}}
{{import org.codehaus.groovy.ast.*;}}
{{ASTNode[] nodes = new AstBuilder().buildFromString('''}}
{{@interface Foo {}}
{{ String value() default ""}}
{{}}}
{{@interface Bar {}}
{{@Foo}}
{{ String value()}}
{{}}}
{{''')}}
{{nodes[2].methods[0].getAnnotations()}}
> Annotations on annotation methods are missing in the AST
> --------------------------------------------------------
>
> Key: GROOVY-9399
> URL: https://issues.apache.org/jira/browse/GROOVY-9399
> Project: Groovy
> Issue Type: Bug
> Components: ast builder
> Affects Versions: 3.0.0
> Reporter: James Kleeh
> Priority: Major
>
> In Groovy 2.5, the annotation would be found, in Groovy 3 it is not.
>
> Simple example:
>
> {{{{import org.codehaus.groovy.ast.builder.AstBuilder;}}}}
> {{ {{import org.codehaus.groovy.ast.*;}}}}
> {{{{ASTNode[] nodes = new AstBuilder().buildFromString('''}}}}
> {{ {{@interface Foo {}}}}
> {{ String value() default ""}}
> {{ {{}}}}}
> {{{{@interface Bar {}}}}
> {{{{@Foo}}}}
> {{ String value()}}
> {{ {{}}}}}
> {{ {{''')}}}}
>
> {{nodes[2].methods[0].getAnnotations()}}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)