hg: lambda/lambda/jdk: Update initial lambda APIs and tests to use new syntax.

Rémi Forax forax at univ-mlv.fr
Sun Sep 11 04:59:21 PDT 2011


better with the patch :)

Rémi

On 09/11/2011 01:52 PM, Rémi Forax wrote:
> Hi all,
> I've tried to fix some bugs of the current implementation of
> java.util.functions.
>
> - some constants are still public
>     (BTW, when the compiler will be able to generate the correct bytecode
>      for a lambda, these constants will be not needed any more
>      because constant lambda will be constant by default)
> - a lot of generic signature aren't right and there is inconsistency
>     between the files.
> - some casts are wrong, you can't  cast a Predicate<? super T>  to
>     a Predicate<T>, it's not safe.
> - some methods return a Predicate<Object>  instead of a
>     Predicate<T>  so it will not work if the predicate is used by example
>     in a ?:
> - some short cuts in the implementation are wrong (by example,
>     testing if there is an element in an iterable before creating
>     the lambda is wrong because the iterable can be populated
>     before the lambda is called.
> - fix some implementations, BTW I think the methods xor should be removed
>     for the same reason there is no ^^ in C
>     (nobody use xor in test between booleans)
>
> cheers,
> Rémi
>
> On 09/10/2011 03:49 AM, stuart.marks at oracle.com wrote:
>> Changeset: d9e4e3c106a7
>> Author:    smarks
>> Date:      2011-09-09 18:48 -0700
>> URL:       http://hg.openjdk.java.net/lambda/lambda/jdk/rev/d9e4e3c106a7
>>
>> Update initial lambda APIs and tests to use new syntax.
>>
>> ! src/share/classes/java/util/functions/Blocks.java
>> ! src/share/classes/java/util/functions/Mappers.java
>> ! src/share/classes/java/util/functions/Predicates.java
>> ! src/share/classes/java/util/functions/Reducers.java
>> ! test/java/util/Collection/Extensions.java
>> ! test/java/util/Collection/MOAT.java
>> ! test/java/util/List/Extensions.java
>> ! test/java/util/functions/Block/BlocksTest.java
>> ! test/java/util/functions/Mapper/MappersTest.java
>> ! test/java/util/functions/Predicate/PredicatesTest.java
>> ! test/java/util/functions/Reducer/ReducersTest.java
>>
>>
>



More information about the lambda-dev mailing list