[concurrency-interest] LinkedBlockingQueue does not throw NullPointerException for the method call contains

Holger Hoffstätte holger at wizards.de
Sun Apr 15 18:48:29 EDT 2007


Kasper Nielsen wrote:
> Personally, I would prefer that the collection classes with did not 
> allow inserting of null elements would throw NullPointerException for 
> all methods even if it is only optionally.

Well..personally, I wish everyone would just stop throwing NPEs *at all*
and use IllegalArgumentException _which was made for exactly that
purpose_. NPE shouldn't even *exist*, let alone be thrown manually. Who
came up with that foolish idea anyways? :-(

-h



More information about the Concurrency-interest mailing list