Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Throw IllegalAccessError (IAE): Lookup.findVirtual #13740

Merged
merged 3 commits into from
Oct 19, 2021

Conversation

pshipton
Copy link
Member

@pshipton pshipton commented Oct 19, 2021

Throw IAE for non-public virtual methods if invoked by MethodHandles created
using Lookup.findVirtual.
For KIND_INTERFACE, OpenJ9 MHs always get the method from the vTable. Private
methods do not appear in the vTable. So, the check for J9AccPrivate is not
needed.

Throw IAE for non-public virtual methods if invoked by MethodHandles created
using Lookup.findVirtual.

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh and others added 2 commits October 19, 2021 16:59
For KIND_INTERFACE, OpenJ9 MHs always get the method from the vTable. Private
methods do not appear in the vTable. So, the check for J9AccPrivate is not
needed.

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
The interface dispatch implemented by InterfaceHandle is supposed to
throw IllegalAccessError (IAE) when the dispatched callee is not public,
just like the dispatch performed by invokeinterface.
@keithc-ca
Copy link
Contributor

This has been tested internally.

@keithc-ca keithc-ca merged commit 9f0b7b7 into eclipse-openj9:master Oct 19, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants