You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Yih Tsern (JIRA)" <ji...@apache.org> on 2016/01/01 11:13:39 UTC

[jira] [Created] (GROOVY-7723) propertyMissing(String,Object) called for missing getter

Yih Tsern created GROOVY-7723:
---------------------------------

             Summary: propertyMissing(String,Object) called for missing getter
                 Key: GROOVY-7723
                 URL: https://issues.apache.org/jira/browse/GROOVY-7723
             Project: Groovy
          Issue Type: Bug
         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 is 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}



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