JDK-8024138 : (Spec clarification) Lambda Metafactory spec should state DMH constraint on implMethod
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.lang.invoke
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2013-09-02
  • Updated: 2013-12-17
  • Resolved: 2013-10-22
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.
JDK 8
8 b115Fixed
Related Reports
Relates :  
Description
The MethodHandle passed to the lambda metafactory must be a direct method handle, suitable for cracking by MethodHandleInfo.  We could either borrow the constraints of MHI or the constraints of "method handles that can be in the constant pool"; the latter is narrower and fits better into intended usage.  

This is a spec-only clarification.
Comments
Here is the update included in the spec changes, --- old/src/share/classes/java/lang/invoke/LambdaMetafactory.java 2013-10-16 09:27:08.153059021 -0700 +++ new/src/share/classes/java/lang/invoke/LambdaMetafactory.java 2013-10-16 09:27:07.997059024 -0700 @@ -183,11 +183,11 @@ * @param samMethodType MethodType of the method in the functional interface * to which the lambda or method reference is being * converted, represented as a MethodType. - * @param implMethod The implementation method which should be called - * (with suitable adaptation of argument types, return - * types, and adjustment for captured arguments) when - * methods of the resulting functional interface instance - * are invoked. + * @param implMethod A direct method handle describing the implementation + * method which should be called (with suitable adaptation + * of argument types, return types, and adjustment for + * captured arguments) when methods of the resulting + * functional interface instance are invoked. * @param instantiatedMethodType The signature of the primary functional * interface method after type variables * are substituted with their instantiation
16-10-2013

Patch currently in lambda repository, will be pulled in with other spec changes
07-10-2013