Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
As part of GROOVY-3726 we fixed getter/setter method modifiers for volatile (or transient) properties. The @Bindable and @Vetoable transforms however generate their own setters and bypass that fix.
Here is a script to reproduce the problem:
import static java.lang.reflect.Modifier.toString import groovy.beans.Bindable class Foo { volatile Date now } @Bindable class Bar { volatile Date then } void pretty(int mod) { println "${mod.toString().padRight(10)}" + toString(mod) } pretty(Foo.getMethod('getNow').modifiers) pretty(Foo.getMethod('setNow', Date).modifiers) pretty(Bar.getMethod('getThen').modifiers) pretty(Bar.getMethod('setThen', Date).modifiers)
which currently produces:
1 public 1 public 1 public 65 public volatile
Attachments
Issue Links
- links to