Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.3.9
Description
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
@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"; }
Using groovy 2.3.9 and java 1.8.0_25 with this annotation:
@Document(indexName = "articles", type = "article", shards = 1, replicas = 0, refreshInterval = "-1", indexStoreType = "memory")
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?
Attachments
Issue Links
- is related to
-
GROOVY-9206 Cannot use annotation with attribute of type char
- Closed
-
GROOVY-9366 Unable represent literal byte costant
- Closed
-
GROOVY-9205 Specify primitive annotation default value using number literal with cast/coerce
- Closed
- relates to
-
GROOVY-6019 Cross compilation of Groovy annotation on Java class does not work
- Closed
-
GROOVY-6025 Using short, byte, char annotation definition attribute constants should be supported
- Closed
-
GROOVY-10068 Cannot compile when set short value to annotation by already defined short variable since version 2.5.4
- Closed