groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Peru <>
Subject Wrong bytecode generated for getters and setters of volatile field
Date Tue, 11 Oct 2016 09:34:27 GMT

I am the developer of the SonarQube Java Analyzer.
While we are doing an analysis we are reading bytecode of external
dependencies of the compilation unit analyzed.

A user recently came back on SonarQube google group complaining about a
failure on one of the invariant we have in our bytecode analysis where a
bridge method was not marked as synthetic.

Investigating a bit further it appears that the failing method is a getter
generated by groovy compiler and that it is indeed (wrongly) marked as
bridge because it is the same bit as the one used for volatile for fields.

This is an issue that is supposed to be solved  a long time ago per :

A reproducer of this issue can be found by compiling the following project
: and looking at the generated
.class files.

Related discussion about this specific problem on SonarQube Google groups:!msg/sonarqube/htmOuRPm4-c/AVMlDxvOCgAJ

as I am no Groovy expert, can anyone shed a light on this ? It sounds to me
like there is still a bug on Groovy side on this but I might be wrong.

Thanks for your help.

*Nicolas PERU | SonarSource*
*Senior Developer*

View raw message