Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-6335

MissingPropertyException when private static property is used inside a nested closure and called from a child class

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.0.0-alpha-1
    • groovy-runtime
    • None

    Description

      The folowing throws a MissingPropertyException:

      import groovy.util.logging.*
      @Log
      class A {
          void logSth() {
              2.times { 1.times { log.info 'sth' } }
          }
      }
      
      class B extends A {}
      
      new B().logSth()
      

      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.

      Attachments

        Issue Links

          Activity

            People

              emilles Eric Milles
              erdi Marcin Erdmann
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: