Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8337205

Typo in Stack vs Deque Method table in Deque specification

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 24
    • 22, 23, 24
    • core-libs

      In the "Comparison of Stack and Deque methods" table in java.util.Deque specification, it incorrectly claims that `peek()` (returns null on empty) is equivalent to `getFirst()` (throws exception on empty), but in fact, it should be equivalent to `peekFirst()`, as 2 other places in the specification (in the "Comparison of Queue and Deque methods" table and the `peek()` method) claims.

      The fix would be simple as to update the typo in the "stack" table.

      Mailing list thread: https://mail.openjdk.org/pipermail/jdk-dev/2024-July/009258.html

            smarks Stuart Marks
            liach Chen Liang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: