You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2019/08/12 01:56:00 UTC
[jira] [Closed] (GROOVY-9166) Empty static initializer generates
code
[ https://issues.apache.org/jira/browse/GROOVY-9166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King closed GROOVY-9166.
-----------------------------
Resolution: Not A Problem
The current generated bytecode seems intended to me, so I'll mark as not a problem from the Groovy side.
> Empty static initializer generates code
> ---------------------------------------
>
> Key: GROOVY-9166
> URL: https://issues.apache.org/jira/browse/GROOVY-9166
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 2.5.7
> Reporter: Lőrinc Pap
> Priority: Major
> Attachments: Screen Shot 2019-06-08 at 13.57.31.png
>
>
> After updating Gradle from Groovy {{2.5.4}} to {{2.5.7}} the following test started to fail:
> [https://github.com/gradle/gradle/blob/bc8d6ebd11d81be35ea7453cda6f955de236add3/subprojects/plugins/src/integTest/groovy/org/gradle/java/compile/AbstractJavaGroovyCompileAvoidanceIntegrationSpec.groovy#L330]
>
> The reason was that:
> * implicit and explicit default constructors don't generate the same bytecode anymore (-explicit- implicit one is marked as {{@Generated}} now)
> * static initializers generate and empty if statement
> See the attachment and the corresponding PR: [https://github.com/gradle/gradle/pull/9627]
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)