Details
-
Bug
-
Resolution: Fixed
-
P3
-
21
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8312907 | 21.0.1 | Stuart Marks | P3 | Resolved | Fixed | b04 |
JDK-8311977 | 21 | Stuart Marks | P3 | Resolved | Fixed | b32 |
Description
https://download.java.net/java/early_access/jdk21/docs/api/java.base/java/util/Deque.html#reversed()
"Implementation Requirements:
The implementation in this interface returns an instance of a reverse-ordered Deque that delegates its operations to this Deque."
The phrase - "delegates its operations to this Deque." one might interpret this the delegation is 'x' to 'x' ( reversedeque.addFirst() ---> deque.addFirst() )
Actual delegation is -> reversedeque.addFirst() ---> deque.addLast()
====
Similar case for - https://download.java.net/java/early_access/jdk21/docs/api/java.base/java/util/SortedMap.html#reversed()
Similar case for - https://download.java.net/java/early_access/jdk21/docs/api/java.base/java/util/SortedSet.html#reversed()
Do we need to clarify the spec here?
"Implementation Requirements:
The implementation in this interface returns an instance of a reverse-ordered Deque that delegates its operations to this Deque."
The phrase - "delegates its operations to this Deque." one might interpret this the delegation is 'x' to 'x' ( reversedeque.addFirst() ---> deque.addFirst() )
Actual delegation is -> reversedeque.addFirst() ---> deque.addLast()
====
Similar case for - https://download.java.net/java/early_access/jdk21/docs/api/java.base/java/util/SortedMap.html#reversed()
Similar case for - https://download.java.net/java/early_access/jdk21/docs/api/java.base/java/util/SortedSet.html#reversed()
Do we need to clarify the spec here?
Attachments
Issue Links
- backported by
-
JDK-8311977 Clarify reversed() default methods' implementation requirements
- Resolved
-
JDK-8312907 Clarify reversed() default methods' implementation requirements
- Resolved
- blocks
-
JDK-8280836 JEP 431: Sequenced Collections
- Closed
- csr for
-
JDK-8311845 Clarify reversed() default methods' implementation requirements
- Closed
- links to
-
Commit openjdk/jdk21/f6ad56bc
-
Commit openjdk/jdk/f82c8184
-
Review openjdk/jdk21/115
-
Review openjdk/jdk/14504
(3 links to)