[ https://issues.apache.org/jira/browse/GROOVY-8897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16696033#comment-16696033 ]
Eric Milles commented on GROOVY-8897: ------------------------------------- {code:groovy} import com.fasterxml.jackson.annotation.JsonProperty class X { @JsonProperty('whatever') String value } {code} I'm not sure if the expectation would be to copy this annotation to the generated methods or leave it on the field only. > Methods generated for Groovy properties do not carry over annotations > --------------------------------------------------------------------- > > Key: GROOVY-8897 > URL: https://issues.apache.org/jira/browse/GROOVY-8897 > Project: Groovy > Issue Type: Improvement > Affects Versions: 2.4.15, 2.5.4 > Reporter: Eric Milles > Priority: Major > > Consider the following: > {code:groovy} > class C { > @Deprecated > boolean condition > } > {code} > Methods {{isCondition}}, {{getCondition}}, {{setCondition}} that are added by > {{Verifier.visitProperty}} do not have the {{java.lang.Deprecated}} > annotation. The PropertyNode has a link to the {{FieldNode}} so deprecated > can be checked for there. But the generated methods do not have this link. -- This message was sent by Atlassian JIRA (v7.6.3#76005)