groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Wagenleitner (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GROOVY-6547) metaClass property changes
Date Fri, 08 Apr 2016 14:36:25 GMT

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

John Wagenleitner commented on GROOVY-6547:
-------------------------------------------

That is actually expected behavior for any Map type since property access does a key lookup.
 As far as I know that's always been the case in Groovy that you had to use {{map.getMetaClass()}}
or {{map.getClass()}} otherwise the property access will be translated to {{map.get("metaClass")}}
which will return {{null}} if you don't have a key by that name.

> metaClass property changes
> --------------------------
>
>                 Key: GROOVY-6547
>                 URL: https://issues.apache.org/jira/browse/GROOVY-6547
>             Project: Groovy
>          Issue Type: Bug
>         Environment: Using Fedora Linux 19 - OpenJDK 1.7.0
>            Reporter: James Gardiner
>
> The metaClass property is not exposed for classes a la Groovy In Action Listing 7.21.
This formerly worked in 1.8.9.



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

Mime
View raw message