Closed GoogleCodeExporter closed 9 years ago
Unfortunately, we probably can never fix equalTo(), isNull(), notNull(),
alwaysTrue()
and alwaysFalse() in this way. There is simply way too much broken code, even
just
within Google, that would break (even more) if we did. (Canonical example: a
method
that accepts Predicate<String> instead of Predicate<? super String> as it is
required
to. There are so many of those.)
To fix all that code would take more time than we have, so we'll just have to
live
with these being wrong.
All that said -- you should be okay with its current formulation. You can
always
coerce Predicates.equalTo(someFoo) to Predicate<Object> either using
Predicates.equalTo((Object) someFoo)
or
Predicates.<Object>equalTo(someFoo)
or just by assigning it directly to a Predicate<Object>.
Original comment by kevin...@gmail.com
on 13 Nov 2009 at 8:02
Original comment by kevinb@google.com
on 8 Dec 2009 at 5:16
Original issue reported on code.google.com by
ray.a.co...@gmail.com
on 13 Nov 2009 at 6:22