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] [Updated] (GROOVY-6335) MissingPropertyException when private static property is used inside a nested closure and called from a child class
Date Mon, 17 Dec 2018 07:53:00 GMT

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

Paul King updated GROOVY-6335:
------------------------------
    Summary: MissingPropertyException when private static property is used inside a nested
closure and called from a child class  (was: MissingPropertyException when static property
is used inside a nested closure and called from a child class)

> MissingPropertyException when private static property is used inside a nested closure
and called from a child class
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-6335
>                 URL: https://issues.apache.org/jira/browse/GROOVY-6335
>             Project: Groovy
>          Issue Type: Bug
>          Components: groovy-runtime
>    Affects Versions: 2.1.2, 2.4.0-rc-1
>            Reporter: Marcin Erdmann
>            Priority: Major
>
> The folowing throws a MissingPropertyException:
> {code}
> import groovy.util.logging.*
> @Log
> class A {
>     void logSth() {
>         2.times { 1.times { log.info 'sth' } }
>     }
> }
> class B extends A {}
> new B().logSth()
> {code}
> Note that exception is not thrown if the method is called on the parent class ({{new
A().logSth()}}) and if log property is accessed from a non-nested closure.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message