RFR: 8354111: JavaDoc states that Iterator.remove() is linear in the LinkedBlockingDeque

kabutz duke at openjdk.org
Wed Apr 9 10:45:54 UTC 2025


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.

-------------

Commit messages:
 - Fixed JavaDoc mistake - Iterator.remove() runs in constant time in the doubly-linked LBD

Changes: https://git.openjdk.org/jdk/pull/24500/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24500&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8354111
  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/24500.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24500/head:pull/24500

PR: https://git.openjdk.org/jdk/pull/24500


More information about the core-libs-dev mailing list