Closed GoogleCodeExporter closed 8 years ago
Throwing IAE for null arguments makes plenty of sense, however we're already
saddled
with years of convention favoring NPE. At Google there was a time several
years ago
when the IAE proponents tried to stage a coup and convert anyone else, but it
was
just too late.
And, unfortunately I don't believe users will be well-served by a further
explosion
in the number of methods in the Preconditions class. Adding more confusion
about
which they're supposed to use, and adding more variation of strategies
throughout
their codebase. I know it's sad, considering the void return type, but I think
checkArgument(foo != null) will just have to serve.
Original comment by kevin...@gmail.com
on 10 Nov 2009 at 6:31
Fair enough
Original comment by jvdne...@gmail.com
on 10 Nov 2009 at 7:31
Original issue reported on code.google.com by
jvdne...@gmail.com
on 10 Nov 2009 at 5:30