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 2022/04/07 18:44:00 UTC

[jira] [Assigned] (GROOVY-10571) Stub generator misses sibling classes in annotation

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

Eric Milles reassigned GROOVY-10571:
------------------------------------

    Assignee: Eric Milles

> Stub generator misses sibling classes in annotation
> ---------------------------------------------------
>
>                 Key: GROOVY-10571
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10571
>             Project: Groovy
>          Issue Type: Bug
>          Components: Stub generator / Joint compiler
>    Affects Versions: 4.0.1
>            Reporter: Christopher Smith
>            Assignee: Eric Milles
>            Priority: Major
>
> To work around [a DynamoDB SDK bug that just turned one|https://github.com/aws/aws-sdk-java-v2/issues/2347], I created an attribute converter that ignores {{MetaClass}} and an {{AnnotationCollector}} that applies it to record classes with some other usual POJO bits.
> The annotation collector is in the same package as the converter-prvider Java class. Running the stub generator produces this output (line breaks added):
> {code}
> @groovy.transform.AnnotationCollector()
> @software.amazon.awssdk.enhanced.dynamodb.mapper.annotations.DynamoDbBean(converterProviders={IgnoreMetaClassAttributeConverterProvider,software.amazon.awssdk.enhanced.dynamodb.DefaultAttributeConverterProvider.class})
> @groovy.transform.stc.POJO()
> @java.lang.annotation.Retention(value=java.lang.annotation.RetentionPolicy.SOURCE) @java.lang.annotation.Target(value=java.lang.annotation.ElementType.TYPE) public @interface DynamoDbRecord2{;}
> {code}
> Note the missing {{.class}} on the first class argument (which is not imported and is present in the same package, but is a Java file).



--
This message was sent by Atlassian Jira
(v8.20.1#820001)