Patch for JDK-8142882: rebinding of a DirectMethodHandle
rasbold at google.com
Thu Nov 12 19:46:45 UTC 2015
Proposed fix for: https://bugs.openjdk.java.net/browse/JDK-8142882
Don't pre-dispatch the receiver of a DirectMethodHandle, as it may allow a
protected method to be accessed.
This fix is a subset of the change for JDK-8050166
<https://bugs.openjdk.java.net/browse/JDK-8050166>, which is already in
jdk8 and jdk9.
The change causes the an NPE to be thrown when a protected MethodHandle is
called via invoke().
An additional backport of JDK-8016839
<https://bugs.openjdk.java.net/browse/JDK-8016839> is needed, if it is
desired to that a proper IllegalAccessError is thrown instead of an NPE, as
happens with jdk8 / jdk9.
More information about the jdk7u-dev