RFR: 8078641: MethodHandle.asTypeCache can retain classes from unloading [v3]
Vladimir Ivanov
vlivanov at openjdk.java.net
Fri Sep 3 12:04:27 UTC 2021
On Fri, 3 Sep 2021 00:09:17 GMT, Mandy Chung <mchung at openjdk.org> wrote:
> For the change of MethodHandle::asType to a final method, this needs a CSR.
It is not allowed to extend/subclass `MethodHandle` outside `java.lang.invoke` package.
So, the aforementioned change doesn't have any compatibility risks. Do I miss something important?
/**
* Package-private constructor for the method handle implementation hierarchy.
* Method handle inheritance will be contained completely within
* the {@code java.lang.invoke} package.
*/
// @param type type (permanently assigned) of the new method handle
/*non-public*/
MethodHandle(MethodType type, LambdaForm form) {
-------------
PR: https://git.openjdk.java.net/jdk/pull/5246
More information about the core-libs-dev
mailing list