Also, I'm +1 for the release if this can be fixed later without breaking
the compatibility.

Emmanuel Bourg


Le 20/11/2013 10:45, Emmanuel Bourg a écrit :
> After an ultimate round of code review I have another observation
> regarding the functor API.
> 
> In FalsePredicate the INSTANCE singleton is defined as
> Predicate<Object>. In other predicates such as TruePredicate it's
> defined as Predicate<?>. In both cases this prevents the declaration of:
> 
>    Predicate<Foo> predicate = FalsePredicate.INSTANCE;
> 
> This will fail to compile.
> 
> I suggest declaring the INSTANCE fields as ungenerified Predicates, such
> that the above example compiles with an unchecked warning. That's
> similar to the EMPTY_LIST and similar constants in java.util.Collections.
> 
> Emmanuel Bourg


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to