hg: lambda/lambda/langtools: Bug fixes:

Rémi Forax forax at univ-mlv.fr
Mon Sep 20 00:20:00 PDT 2010


  Le 19/09/2010 00:05, maurizio.cimadamore at oracle.com a écrit :
> Changeset: 52681eb717e7
> Author:    mcimadamore
> Date:      2010-09-18 15:03 -0700
> URL:       http://hg.openjdk.java.net/lambda/lambda/langtools/rev/52681eb717e7
>
> Bug fixes:
> *) proxied lambdas/method refs do not behave consistently with Object.equals() [kudos to Remi for the fix]
> *) SAM conversion should not box/unbox lambda parameter type (i.e. a lambda acceoting an int cannot be SAM-converted to a method accepting Integer)
>
> ! src/share/classes/com/sun/runtime/ProxyHelper.java
> ! src/share/classes/com/sun/tools/javac/code/Types.java
> + test/tools/javac/lambda/LambdaConv10.java
> + test/tools/javac/lambda/LambdaConv10.out
> + test/tools/javac/lambda/MethodReference13.java
>

Hi Maurizio,
I think that System.identityHashCode() should be used instead of 
handler.hashCode().

As far as I remember the spec says that a SAM type inherits from Object so
sam.hashCode() should be equals to System.identityHashCode(sam).

Cheers,
Rémi



More information about the lambda-dev mailing list