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

John Wagenleitner commented on GROOVY-7723:
-------------------------------------------

Looks like [commit 
97a45dfb3e3c5212c36|https://github.com/apache/groovy/commit/97a45dfb3e3c5212c3610cd90fe1e7434614b260#diff-c1354c0d7df171ad8cafcb3d1bf63857L535]
 introduced this change.  The original code would not have delegated to the 
setter method.  I don't think the intent of the commit was to change the 
behavior but resulted inadvertently due to the refactoring.

> propertyMissing(String,Object) called for missing getter
> --------------------------------------------------------
>
>                 Key: GROOVY-7723
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7723
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 2.4.0
>         Environment: Tested with Groovy 1.8.0, 2.1.0, 2.2.2, and 2.4.0.
>            Reporter: Yih Tsern
>            Priority: Minor
>
> GROOVY-2098 says that {{propertyMissing(String)}} is for getters, while 
> {{propertyMissing(String,Object)}} is for setters.
> But as the code snippet below shows, when {{propertyMissing(String)}} is 
> missing, missing getters are handled by {{propertyMissing(String,Object)}}:
> {code:java}
> class Sample {
>     /**
>     def propertyMissing(String name) {
>         return "propertyMissing(String)"
>     }
>     **/
>     def propertyMissing(String name, value) {
>         return "propertyMissing(String,Object)"
>     }
> }
> println new Sample().missing // Prints `propertyMissing(String,Object)`
> {code}
> Is this a bug?



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

Reply via email to