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/07/06 18:27:00 UTC

[jira] [Updated] (GROOVY-7252) Cross compilation of Groovy annotation on Java class does not work

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

Eric Milles updated GROOVY-7252:
--------------------------------
    Summary: Cross compilation of Groovy annotation on Java class does not work  (was: CLONE - Cross compilation of Groovy annotation on Java class does not work)

> Cross compilation of Groovy annotation on Java class does not work
> ------------------------------------------------------------------
>
>                 Key: GROOVY-7252
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7252
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 2.3.9
>            Reporter: Eric Rodriguez
>            Priority: Major
>              Labels: annotations
>
> This is a follow-up of GROOVY-6019
> Regarding this PR https://github.com/groovy/groovy-core/pull/143
> I'm trying to use spring-data-elasticsearch annotations
> {code:title=Document.java}
> @Persistent
> @Inherited
> @Retention(RetentionPolicy.RUNTIME)
> @Target({ElementType.TYPE})
> public @interface Document {
> 	String indexName();
> 	String type() default "";
> 	short shards() default 5;
> 	short replicas() default 1;
> 	String refreshInterval() default "1s";
> 	String indexStoreType() default "fs";
> }
> {code}
> Using groovy 2.3.9 and java 1.8.0_25 with this annotation:
> {code}
> @Document(indexName = "articles", type = "article", shards = 1, replicas = 0, refreshInterval = "-1", indexStoreType = "memory")
> {code}
> I get the following errors:
> Error:(13, 62) Groovyc: Attribute 'shards' should have type 'java.lang.Short'; but found type 'int' in @org.springframework.data.elasticsearch.annotations.Document
> Error:(13, 76) Groovyc: Attribute 'replicas' should have type 'java.lang.Short'; but found type 'int' in @org.springframework.data.elasticsearch.annotations.Document
> Could this be a regression?



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