Groovy
  1. Groovy
  2. GROOVY-2503 MOP 2.0 design inflluencing issues
  3. GROOVY-2433

Closure in base class unable to call private methods when invoked from derived class

    Details

    • Type: Sub-task Sub-task
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.5
    • Fix Version/s: None
    • Component/s: groovy-runtime
    • Labels:
      None
    • Environment:
      OS: Gentoo Linux; Groovy Version: 1.5.0; JVM: 1.6.0-b105; Hardware: Dual Core HP Laptop

      Description

      Closures defined in base classes are not able to access private methods in the same base class, when invoked from a derived class. Java visibility rules imply that this should not happen. When the private methods are made public, the error disappears. Also, when the closure is converted to a method the problem also disappears. Compiling and running the TestCase class included (along with Base class) should reproduce the problem. It's easier to see the problem than to try and describe it.

      1. testcase.zip
        0.5 kB
        David Clark

        Issue Links

          Activity

          David Clark created issue -
          Jochen Theodorou made changes -
          Field Original Value New Value
          Fix Version/s 1.6 [ 13832 ]
          Jochen Theodorou made changes -
          Link This issue depends upon GROOVY-2503 [ GROOVY-2503 ]
          Jochen Theodorou made changes -
          Fix Version/s 2.0 [ 13489 ]
          Fix Version/s 1.6 [ 13832 ]
          Guillaume Delcroix made changes -
          Link This issue is related to GROOVY-3010 [ GROOVY-3010 ]
          Jochen Theodorou made changes -
          Issue Type Bug [ 1 ] Sub-task [ 7 ]
          Parent GROOVY-2503 [ 61571 ]
          Jochen Theodorou made changes -
          Fix Version/s 3.0 [ 13489 ]
          Jochen Theodorou made changes -
          Component/s groovy-runtime [ 16250 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
          Mark Thomas made changes -
          Workflow jira [ 12731490 ] Default workflow, editable Closed status [ 12743331 ]
          Mark Thomas made changes -
          Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
          Mark Thomas made changes -
          Workflow jira [ 12967526 ] Default workflow, editable Closed status [ 12975235 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              David Clark
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Development