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

The Spliterator characteristics CONCURRENT and IMMUTABLE are mutually exclusive

    XMLWordPrintable

Details

    Backports

      Description

        A DESCRIPTION OF THE REQUEST :
        The Spliterator characteristics CONCURRENT and IMMUTABLE are mutually exclusive yes the JDK accepts them. Of course this is the users mistake but the api would be more robust if the error was reported to the user.

        JUSTIFICATION :
        An exception should be thrown instead, so that the user of the API can be notified of his/her mistake instead of silently accepting and potentially doing the wrong thing when the stream is later used.


        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        An exception should be thrown as early as possible.

        ACTUAL -
        The mistake is never detected and the stream operates most likely in an incorrect fashion.

        Attachments

          Issue Links

            Activity

              People

                psandoz Paul Sandoz
                webbuggrp Webbug Group
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: