-
Enhancement
-
Resolution: Fixed
-
P3
-
8
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8084446 | emb-9 | Paul Sandoz | P3 | Resolved | Fixed | team |
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.
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.
- backported by
-
JDK-8084446 The Spliterator characteristics CONCURRENT and IMMUTABLE are mutually exclusive
-
- Resolved
-