jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • groovy
  • GROOVY-2503 MOP 2.0 design inflluencing issues
  • GROOVY-2433

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

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

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

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.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Hide
    Zip Archive
    testcase.zip
    21/Dec/07 12:19 PM
    0.5 kB
    David Clark
    1. File
      Base.groovy 0.2 kB
    2. File
      TestCase.groovy 0.2 kB
    Download Zip
    Show
    Zip Archive
    testcase.zip
    21/Dec/07 12:19 PM
    0.5 kB
    David Clark

Issue Links

depends upon

Task - A task that needs to be done. GROOVY-2503 MOP 2.0 design inflluencing issues

  • Major - Major loss of function.
  • Open - The issue is open and ready for the assignee to start work on it.
is related to

Task - A task that needs to be done. GROOVY-3010 fix private field visibility

  • Major - Major loss of function.
  • Open - The issue is open and ready for the assignee to start work on it.

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
There are no comments yet on this issue.

People

  • Assignee:
    Unassigned
    Reporter:
    David Clark
Vote (1)
Watch (0)

Dates

  • Created:
    21/Dec/07 12:19 PM
    Updated:
    13/Sep/11 9:57 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.