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

Joe Bowbeer joe.bowbeer at gmail.com
Sun Apr 15 18:20:28 EDT 2007


On 4/15/07, Kasper Nielsen <kasper at kav.dk> wrote:
>
> If this is a bug, remove/removeAll and retainAll should also be fixed
> as well as the collection views returned by ConcurrentHashMap and
> ConcurrentSkipListMap.
>

I was misled by the 'contains' method documentation in the same way
Szabolcs was, but I now see that the meaning of 'optional' is spelled
out in the Collection javadoc.

I think it would be nice if all AbstractQueue implementations
implemented this optional exception in the same way, and maybe they do.

In any event, it could do more harm than good to change it now, I realize.

So, never mind ...


More information about the Concurrency-interest mailing list