[concurrency-interest] LinkedBlockingQueue.clear() broken?

Doug Lea dl@cs.oswego.edu
Wed, 1 Dec 2004 14:09:55 -0500


> Am I being stupid or should I report this as a bug to Sun?


Neither. See:
  http://gee.cs.oswego.edu/dl/concurrency-interest/index.html

Pasting...

 The current version of the main JSR166 APIs can be found at
 http://gee.cs.oswego.edu/dl/concurrent/dist/docs/index.html. They
 include the following updates to the final approved version that will
 someday be changed in J2SE releases:

    * ConcurrentLinkedList.isEmpty failed to override inherited javadoc.
    * ThreadLocal.remove did not state that the value could also be reinitialized using ThreadLocal.set.
    * A bug in LinkedBlockingQueue.clear and LinkedBlockingQueue.drainTo caused subsequently added elements not to be accessible. 

  You can use corrected versions now, without waiting for J2SE
  updates, by obtaining the jsr166 jar and running java using the
  option -Xbootclasspath/p:jsr166.jar (You may need to precede
  "jsr166.jar" with its full file path.)


-Doug