Typo in Stack vs Deque Method table in Deque specification

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 24
    • Affects Version/s: 22, 23, 24
    • Component/s: 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

            Assignee:
            Stuart Marks
            Reporter:
            Chen Liang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: