-
CSR
-
Resolution: Approved
-
P3
-
None
-
binary
-
minimal
-
There is no compatibility risk since constant dynamic was integrated into 11
-
Java API
-
SE
Summary
Constrain constant dynamic bootstrap methods to methods whose first parameter type is MethodHandles.Lookup
.
Problem
It's not easy to use existing methods as constant dynamic bootstrap methods. A level of indirection is required, either explicitly or via use of the bootstrap method ConstantBootstraps.invoke
to drop the first three arguments of lookup, name, and type. While this change does not address that problem it will ensure the problem can be addressed in a future release without affecting compatibility of existing constant dynamic bootstrap methods.
Solution
Constrain constant dynamic bootstrap methods to methods whose first parameter type is MethodHandles.Lookup
.
Specification
The VM specification will require updating, tracked by JDK-8199051. The java/lang/invoke/package-html.java
has been updated (see attached).
- csr of
-
JDK-8199875 Require first parameter type of a condy bootstrap to be Lookup
-
- Resolved
-