[concurrency-interest] LinkedBlockingQueue does not throw NullPointerException for the method call contains
kasper at kav.dk
Sun Apr 15 18:14:03 EDT 2007
Joe Bowbeer wrote:
> Good point. Looks like a bug to me. Will you report it?
> I expect this applies to all subclasses of AbstractQueue.
If this is a bug, remove/removeAll and retainAll should also be fixed
as well as the collection views returned by ConcurrentHashMap and
> On 4/15/07, Szabolcs Ferenczi <szabolcs.ferenczi at gmail.com> wrote:
>> On 15/04/07, Joe Bowbeer <joe.bowbeer at gmail.com> wrote:
>>> Where is the null inserted in your test?
>> It is not inserted but queried, see "q.contains(null)"
>> The documentation for method "public boolean contains(Object o)" says:
>> NullPointerException - if the specified element is null and this
>> collection does not permit null elements (optional)"
>> It seems LinkedBlockingQueue does not permit null elements, does it?
>> Best Regards,
> Concurrency-interest mailing list
> Concurrency-interest at altair.cs.oswego.edu
More information about the Concurrency-interest