JDK-8186048 : ConstantDynamic common bootstrap methods
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.lang.invoke
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2017-08-09
  • Updated: 2017-09-20
  • Resolved: 2017-09-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbd_majorResolved
Related Reports
Blocks :  
Duplicate :  
Description
Consider adding a selection of commonly useful bootstrap methods for returning constant values, such as for:

- loading a primitive class (e.g. int.class)

- loading a primitive value smaller that int (boolean, byte, char and short)

- loading a default value of a given type (null, zero, value-type default)

- loading a named (static final) constant from a class, or (as a special case) an enum member

- loading a regex Pattern

- loading a VarHandle

- loading a value returned from a factory method or perhaps invokers that are method handle based (so a resulting method handle from a combinatorial operation or a transformation is a constant). 

- as a special case of factories, computing List.of, Map.of, Set.of on a list of constants


Certain bootstrap methods may be required for the constant folding language and intrinsic support for ldc and invokedynamic (see JDK-8178320).