hg: lambda/lambda/langtools: Bug fixes:
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Mon Sep 20 22:37:47 PDT 2010
On 20/09/10 00:20, Rémi Forax wrote:
> 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).
>
You're right, in case SAM type is an interface...
Maurizio
> Cheers,
> Rémi
>
>
>
More information about the lambda-dev
mailing list