You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Romain Petit (Jira)" <ji...@apache.org> on 2022/06/15 08:17:00 UTC

[jira] [Commented] (GROOVY-9632) Java 8 Type Param Annotation Not Generated in Byte Code

    [ https://issues.apache.org/jira/browse/GROOVY-9632?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17554454#comment-17554454 ] 

Romain Petit commented on GROOVY-9632:
--------------------------------------

Hello, as this is a bug in 3.0.4 why the correction was made in 4.0.0 ?

Is there a way to backport this correction to groovy 3.x version please ?

> Java 8 Type Param Annotation Not Generated in Byte Code
> -------------------------------------------------------
>
>                 Key: GROOVY-9632
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9632
>             Project: Groovy
>          Issue Type: Bug
>          Components: bytecode, Compiler
>    Affects Versions: 3.0.4
>         Environment: Ubuntu, Groovy 3.0.4, Eclipse Groovy Plugin on Maven
>            Reporter: Ankur Pathak
>            Assignee: Paul King
>            Priority: Major
>              Labels: breaking_change
>             Fix For: 4.0.0-beta-1
>
>          Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> Groovy 3.0.4 is based on Java Minimum Version 1.8. So it should support Byte Code Level compatible with Java 8. And It should generate Annotations on Type Param in its Byte Code.
> ```
> class Names {
>  @NotEmpty
>  List< @NotEmpty String> names;
> }
> Annotation @NotEmpty on Type Param  String is not generated in Byte Code generated by Groovy 3.
> So as a result Bean Validation Api 2.0 is not working with Groovy.
>  
> We have a similar issue in Kotlin also and as a result Bean Validation Api 2.0 was not working ith Kotlin as well.
> Links to similar issue reported with Spring Team and Kotlin Team are:
> [https://github.com/spring-projects/spring-framework/issues/21462]
> [https://youtrack.jetbrains.com/issue/KT-25158]
>  
> ```



--
This message was sent by Atlassian Jira
(v8.20.7#820007)