[8] Review request for 8004970, 8004971, and 8006817: implement serialization in lambda metafactory and metafactory fix
Remi Forax
forax at univ-mlv.fr
Fri Feb 15 17:30:47 PST 2013
On 02/16/2013 01:00 AM, Brian Goetz wrote:
>> in MethodHandleInfo:
>> - getReferenceKindString should not be public, it's a detail of
>> implementation.
>
> The purpose of this call is so that clients who use MHI to crack an MH
> can turn it into an accurate string representation, such as what javap
> does when dumping constant pools with MH constants in it. Otherwise,
> everyone has to write their own switch based on what is in the JLS.
Everyone that want a string representation of a constant method handle
stored in the constant pool will have to write it's own switch based on
the JVM spec ...
Moreover, at some point in the future, the JSR 292 EG may decide to
extend that class to reflect more method handles that only constant ones
and requiring to provide a stable name for those non constant method
handles is constraint I would like to avoid.
>
>> in SerializedLambda:
>> - I think it should declare a serialUID, so you don't need a ad-hoc
>> versioning.
>
> Agreed.
>
>> (to answer to the question line 235)
>> - Also does the constructor
>> SerializedLambda(Class ,MethodHandle,MethodHandle,MethodType,Object[])
>> still used ?
>
> Not in the JDK. Robert, what about compiler-generated code? If not
> used, we should remove it.
Rémi
More information about the lambda-dev
mailing list