You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Daniel Sun (Jira)" <ji...@apache.org> on 2020/07/11 21:22:00 UTC

[jira] [Commented] (GROOVY-9636) Inconsistent behaviour of isSynthetic between Groovy version 2.* and 3.*

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

Daniel Sun commented on GROOVY-9636:
------------------------------------

I can not recall why we want to remove {{synthetic}} modifier...
[~paulk] Could you recall the reason?

> Inconsistent behaviour of isSynthetic between Groovy version 2.* and 3.*
> ------------------------------------------------------------------------
>
>                 Key: GROOVY-9636
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9636
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 3.0.4
>            Reporter: Dmitriy Neretin
>            Priority: Major
>
> Following steps are needed to reproduce the issue:
>  * Checkout [https://github.com/dimarzio/groovy_sandbox]
>  * Current groovy dependency in the project build file is 3.0.4
>  * Run the App class
>  ** Which obtains a class literal, takes a getMetaClass method and executes isSynthetic() on it
>  * isSynthetic() returns false, which is not right (at least my assumption!) and leads to the failed assertion
>  * Now, change the groovy version in the build.gradle to 2.5.8
>  * Run the App class again
>  * isSynthetic() returns true, which is right, assertion will be passed
> The problem described above leads to problems in the reflection-based bean processors like in the AWS DynamoDB SDK. The processor for example recognizes getMetaClass as a DynamodDB table property and tries to convert it as a proper table property.
> But there are theoretically infinite amount of other problems.
> Java version: OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.7+10)
>  
> Current workaround - Groovy version 2.* can be used.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)