[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 15:40:48 PST 2013

On 02/12/2013 04:23 PM, Robert Field wrote:
> Please review the fixes for CRs:
>         http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8004970
>         http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8004971
>         http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8006817
> Webrev:
>         http://cr.openjdk.java.net/~rfield/8004970
> Thank,
> Robert

Hi Robert,
few comments,

in MethodHandleInfo:
  - getReferenceKindString should not be public, it's a detail of 

in InnerClassLambdaMetaFactory:
  - spinInnerClass() should return a simple Class<?>.
  - generateWriteReplace: there is still a mv.dup() that should be 
replaced by

in AbstractValidatingLambdaMetafactory:
   - field markerInterfaces should be declared as Class<?>[]
     (you can replace all Class by Class<?>)

in SerializedLambda:
   - I think it should declare a serialUID, so you don't need a ad-hoc 
     (to answer to the question line 235)
   - Also does the constructor
SerializedLambda(Class ,MethodHandle,MethodHandle,MethodType,Object[])
     still used ?

in TypeConvertingMethodAdapter:
   - at the end, load/dup/areturn/getfield should be replaced by their 
     code inlined. I don't see a real interest to these too small method.
     Only iconst is really complex so worth a dedicated method.


More information about the lambda-dev mailing list