grails / gorm-hibernate5

GORM for Hibernate 5
Apache License 2.0
65 stars 71 forks source link

Use @AutoClone only with @CompileStatic #501

Open arixmkii opened 2 years ago

arixmkii commented 2 years ago

Groovy 3 language runtime can't handle this properly on JDK17 (potentially JDK17+). The recommended workaround is to use @CompileStatic https://issues.apache.org/jira/browse/GROOVY-10405?focusedCommentId=17487003&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17487003

Alternatively one could just manually write all the code, which is generated by @AutoClone and don't use it.

Related to #402

arixmkii commented 2 years ago

It seems that grails-data-mapping could also be affected https://github.com/grails/grails-data-mapping/search?q=AutoClone

codeconsole commented 2 years ago

It sounds like simply upgrading to Groovy 4.x will also solve this issue.