On Fri, 3 Sep 2021 12:01:12 GMT, Vladimir Ivanov <[email protected]> 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) {
> ```
Sorry for the late reply as I was on vacation and just return today.
Thanks for the clarification. I missed the fact that `MethodHandle` has no
public constructor and cannot be extended. This is fine.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5246