Skip to content

Method reference to protected method in base class in other package fails with IllegalAccessError #89

Closed
@mikaelstaldal

Description

@mikaelstaldal

A method reference to protected method in base class in other package fails with java.lang.IllegalAccessError at runtime.

Probably since it is called from a generated inner class which is not a subclass of the base class, and therefore cannot access the protected method the base class in other package.
java.lang.IllegalAccessError: Method 'void com.foo.common.BaseClass.someMethod()' is inaccessible to class 'com.foo.stuff.Subclass$$Lambda$3'

com.foo.stuff.Subclass extends com.foo.common.BaseClass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions