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

remove sun.awt.util.IdentityLinkedList

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • None
    • client-libs
    • 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.

            smarks Stuart Marks
            smarks Stuart Marks
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: