-
Enhancement
-
Resolution: Fixed
-
P4
-
None
-
None
-
b14
The sun.awt.util.IdentityLinkedList is a private, internal copy of java.util.LinkedList that maintains identity (==) semantics instead of equals() semantics. The identity semantics are used in specific cases in AWT.
Like java.util.LinkedList, IdentityLinkedList implements both the List and Deque interfaces.
The forthcoming Sequenced Collection work (JEP 431) adds a reversed() default method to both List and Deque with covariant overrides in each. Any class that implements both interfaces needs to reconcile the conflicting return types. Doing this work is required for a public API such as j.u.LinkedList. Something similar could be done for IdentityLinkedList. However, it probably isn't worth retrofitting IdentityLinkedList, as it's used only in a couple places, and the new reversed() view wouldn't be used at all.
Instead, remove IdentityLinkedList and replace its uses with IdentityArrayList.
Like java.util.LinkedList, IdentityLinkedList implements both the List and Deque interfaces.
The forthcoming Sequenced Collection work (JEP 431) adds a reversed() default method to both List and Deque with covariant overrides in each. Any class that implements both interfaces needs to reconcile the conflicting return types. Doing this work is required for a public API such as j.u.LinkedList. Something similar could be done for IdentityLinkedList. However, it probably isn't worth retrofitting IdentityLinkedList, as it's used only in a couple places, and the new reversed() view wouldn't be used at all.
Instead, remove IdentityLinkedList and replace its uses with IdentityArrayList.