ADDITIONAL SYSTEM INFORMATION :
All Java versions
A DESCRIPTION OF THE PROBLEM :
One of the features of the LinkedBlockingDeque is that it is a doubly-linked node queue, with pointers in each node to "prev" and "next", which allows remove() in the Iterator to remove the node in constant time. However, in the JavaDoc of the class, it lists Iterator.remove() as an example of a method that takes linear time.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Look at the JavaDoc in java.util.concurrent.LinkedBlockingDeque
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
* <p>Most operations run in constant time (ignoring time spent
* blocking). Exceptions include {@link #remove(Object) remove},
* {@link #removeFirstOccurrence removeFirstOccurrence}, {@link
* #removeLastOccurrence removeLastOccurrence}, {@link #contains
* contains}, and the bulk operations, all of which run in linear
* time.
ACTUAL -
* <p>Most operations run in constant time (ignoring time spent
* blocking). Exceptions include {@link #remove(Object) remove},
* {@link #removeFirstOccurrence removeFirstOccurrence}, {@link
* #removeLastOccurrence removeLastOccurrence}, {@link #contains
* contains}, {@link #iterator iterator.remove()}, and the bulk
* operations, all of which run in linear time.
---------- BEGIN SOURCE ----------
No test code necessary.
---------- END SOURCE ----------
All Java versions
A DESCRIPTION OF THE PROBLEM :
One of the features of the LinkedBlockingDeque is that it is a doubly-linked node queue, with pointers in each node to "prev" and "next", which allows remove() in the Iterator to remove the node in constant time. However, in the JavaDoc of the class, it lists Iterator.remove() as an example of a method that takes linear time.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Look at the JavaDoc in java.util.concurrent.LinkedBlockingDeque
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
* <p>Most operations run in constant time (ignoring time spent
* blocking). Exceptions include {@link #remove(Object) remove},
* {@link #removeFirstOccurrence removeFirstOccurrence}, {@link
* #removeLastOccurrence removeLastOccurrence}, {@link #contains
* contains}, and the bulk operations, all of which run in linear
* time.
ACTUAL -
* <p>Most operations run in constant time (ignoring time spent
* blocking). Exceptions include {@link #remove(Object) remove},
* {@link #removeFirstOccurrence removeFirstOccurrence}, {@link
* #removeLastOccurrence removeLastOccurrence}, {@link #contains
* contains}, {@link #iterator iterator.remove()}, and the bulk
* operations, all of which run in linear time.
---------- BEGIN SOURCE ----------
No test code necessary.
---------- END SOURCE ----------
- csr for
-
JDK-8354174 JavaDoc states that Iterator.remove() is linear in the LinkedBlockingDeque
-
- Closed
-
- duplicates
-
JDK-8354169 JavaDoc states that Iterator.remove() is linear in the LinkedBlockingDeque
-
- Closed
-
- links to
-
Review(master) openjdk/jdk/24500