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

Joe Bowbeer joe.bowbeer at gmail.com
Mon Apr 16 19:19:13 EDT 2007


Martin Buchholz mentioned off-list that we could link the instances of
"(optional)" in the Collection method descriptions to the paragraph in
the Collection class description that covers optional restrictions.

Is this worthwhile?

Here's what the fix would look like:

Collection.java

1. Add "optional-restrictions" anchor.

 * <p><a name="optional-restrictions"/>
 * Some collection implementations have restrictions on the elements that they
 * may contain.  For example, some implementations prohibit null elements,

2. Add links to the optional restrictions paragraph.

There are ten instances of "(optional)" -- resulting from five sets of
ClassCastException and NullPointerException.  In each instance,
"(optional)" would be replaced by:

 (<a href="#optional-restrictions">optional</a>)

--Joe


More information about the Concurrency-interest mailing list