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

Clarify spliterator characteristics for collections containing no elements

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 8
    • None
    • core-libs

    Description

      The spliterator for a collection containing no elements should only be required to support SIZED and need not report any additional required characteristics.

      This makes it easier to share a single immutable instance of an empty spliterator for empty collections obtained from Collectionsempty* methods. Since there are no elements it does not matter if additional characteristics are not reported since they would not aid the client to "to control, specialize or simplify computation".

      The reporting of SIZED is important since clients can determine if the spliterator is empty.

      Attachments

        Issue Links

          Activity

            People

              psandoz Paul Sandoz
              psandoz Paul Sandoz
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: