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

Eric Milles commented on GROOVY-11675:
--------------------------------------

I don't follow why this situation or the 11633 indicates that the access 
method(s) should be final.  Synchronized makes sense.  But what does the method 
being unable to be overridden have to do with read-only?

> split property definitions aren't carrying final modifier to getters
> --------------------------------------------------------------------
>
>                 Key: GROOVY-11675
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11675
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 4.0.24, 4.0.25, 4.0.26
>            Reporter: Paul King
>            Priority: Minor
>
> Split property definitions were created as an alternative to the full 
> long-hand way to express a property. They allow modifiers (final and 
> synchronized), and annotations to be applied to either the backing field or 
> the accessors.
>  
> {code:groovy}
> import groovy.transform.PackageScope
> class MyTask {
>     @Deprecated private final Integer f1 = 0
>     final Integer f1
>     protected synchronized Integer f2 = 0
>     synchronized Integer f2
>     public Integer f3 = 0
>     @Deprecated Integer f3
> }
> println MyTask
> {code}
> Currently, everything is carried across except for the final on the {{f1}} 
> accessor methods.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to