Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.4.7
-
None
Description
Example:
package one; public class Base { protected int foo() { 123 } }
package two; class SubBase extends Base { class Inner { int test() { foo() } } int innerTest() { new Inner().test() } } assert new SubBase().innerTest() == 123
The code above will fail with the following error:
java.lang.IllegalAccessError: tried to access method one.Base.foo()I from class two.SubBase$Inner
This is due to bridge methods for protected methods not being correctly generated (and subsequently used when writing protected method invocations.)
Attachments
Issue Links
- links to