commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Bourg <ebo...@apache.org>
Subject Re: [VOTE] Release of Commons Collections 4.0 based on RC4
Date Wed, 20 Nov 2013 09:49:48 GMT
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



Mime
View raw message