-
Sub-task
-
Resolution: Duplicate
-
P2
-
None
-
8
-
b97
Both spliterator's methods
- forEachRemaining()
- tryAdvance()
specify
"throws NullPointerException if the specified action is null"
This doesn't happen for a spliterator produced as below:
Stream.builder().build().spliterator().forEachRemaining((Consumer)null);
Stream.builder().build().spliterator().tryAdvance((Consumer)null);
The following test JCK will fail due to this issue
api/java_util/stream/Stream/Builder.html#Builder[checkSpliterator]
- forEachRemaining()
- tryAdvance()
specify
"throws NullPointerException if the specified action is null"
This doesn't happen for a spliterator produced as below:
Stream.builder().build().spliterator().forEachRemaining((Consumer)null);
Stream.builder().build().spliterator().tryAdvance((Consumer)null);
The following test JCK will fail due to this issue
api/java_util/stream/Stream/Builder.html#Builder[checkSpliterator]
- relates to
-
JDK-8019530 Spliterator from an empty boxed primitive streams doesn't throw NPE for null consumers
-
- Closed
-