Paul King created GROOVY-7969:
---------------------------------

             Summary: Incorrect modifers on setter for volatile property with 
@Bindable/@Vetoable
                 Key: GROOVY-7969
                 URL: https://issues.apache.org/jira/browse/GROOVY-7969
             Project: Groovy
          Issue Type: Bug
            Reporter: Paul King


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:
{code}
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)
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to