Name: rmT116609 Date: 09/28/2004 A DESCRIPTION OF THE PROBLEM : There is an error in your documentation of the isEmpty() method of the newly introduced class ConcurrentLinkedQueue.According to the documentation: "This implementation returns size() == 0." Actually isEmpty() checks whether the first element in the queue is non-null. This is important because it's a constant time operation, unlike size() which is not. I assume the JavaDoc was copied from another Collection, where the implementation was as described (and size() was a constant time op). I assume this report might apply to other new classes n the Collections Framework. EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - This implementation returns first() == null. ACTUAL - This implementation returns size() == 0. URL OF FAULTY DOCUMENTATION : http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ConcurrentLinkedQueue.html#isEmpty() (Incident Review ID: 315692) ======================================================================
|