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

java.util.SortedSet unnecessarily extends java.util.Set

XMLWordPrintable

      A DESCRIPTION OF THE PROBLEM :
      Up until Java 20, in the Java Collections Framework, the SortedSet interface directly extended the Set interface.

      With the introduction of JEP431 (Sequenced Collections) in Java 21, the new SequencedSet interface extends Set (and SequencedCollection), and SortedSet now extends SequencedSet AND Set. But as stated, because SequencedSet extends Set, and SortedSet extends SequencedSet, then SortedSet no longer needs to extend Set (tools report Set is a redundant superinterface for SortedSet because of this).


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

              Created:
              Updated:
              Resolved: