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

Collections.emptySortedSet().spliterator() doesn't report DISTINCT, ORDERED, SORTED

XMLWordPrintable

      The specification on SortedSet.spliterator

      http://download.java.net/jdk8/docs/api/java/util/SortedSet.html#spliterator()

      says

      "The Spliterator reports [...] Spliterator.DISTINCT, Spliterator.SORTED and Spliterator.ORDERED. "

      This is not true for spliterator returned by

      Collections.emptySortedSet().spliterator()


      The following JCK tests fail due to this:

      api/java_util/Collections/empty/index.html#EmptySortedSetSpliterator[characteristics_DISTINCT]
      api/java_util/Collections/empty/index.html#EmptySortedSetSpliterator[characteristics_ORDERED]
      api/java_util/Collections/empty/index.html#EmptySortedSetSpliterator[characteristics_SORTED]
      api/java_util/Collections/empty/index.html#EmptySortedSetSpliterator[hasCharacteristics_DISTINCT]
      api/java_util/Collections/empty/index.html#EmptySortedSetSpliterator[hasCharacteristics_ORDERED]
      api/java_util/Collections/empty/index.html#EmptySortedSetSpliterator[hasCharacteristics_SORTED]




            psandoz Paul Sandoz
            dbessono Dmitry Bessonov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: