groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul King (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (GROOVY-7942) @Lazy transform creates unneeded getter/setter for backing store field
Date Wed, 01 Feb 2017 23:19:07 GMT

     [ https://issues.apache.org/jira/browse/GROOVY-7942?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Paul King closed GROOVY-7942.
-----------------------------

> @Lazy transform creates unneeded getter/setter for backing store field
> ----------------------------------------------------------------------
>
>                 Key: GROOVY-7942
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7942
>             Project: Groovy
>          Issue Type: Improvement
>            Reporter: Paul King
>            Assignee: Paul King
>             Fix For: 2.4.8
>
>
> The following code:
> {code}
> @Lazy String foo
> {code}
> creates an appropriate {{getFoo}} getter method and a private {{$foo}} backing field
but in renaming the fieldNode to have the dollar prefix, it doesn't remove the corresponding
entry in the ClassNode's properties list. This results in some spurious {{get$Foo}} and {{set$Foo}}
methods being created in later compilation phases. On the one hand these could be regarded
as some backdoor semi-internal way to get access to the backing field but in reality using
those methods would violate the contract that {{@Lazy}} is trying to provide..



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message