-
Sub-task
-
Resolution: Duplicate
-
P2
-
None
-
8
The problem is similar to JDK-8019479, the following code
LongStream.empty().boxed().spliterator().tryAdvance((Consumer)null);
LongStream.empty().boxed().spliterator().forEachRemaining((Consumer)null);
IntStream.empty().boxed().spliterator().tryAdvance((Consumer)null);
IntStream.empty().boxed().spliterator().forEachRemaining((Consumer) null);
DoubleStream.empty().boxed().spliterator().tryAdvance((Consumer)null);
DoubleStream.empty().boxed().spliterator().forEachRemaining((Consumer) null);
would not throw anything.
The following JCK tests will fail due to this:
api/java_util/stream/DoubleStream/Empty.html#Empty[checkBoxed]
api/java_util/stream/IntStream/Empty.html#Empty[checkBoxed]
api/java_util/stream/IntStream/Empty.html#Empty[checkDoubles]
api/java_util/stream/IntStream/Empty.html#Empty[checkLongs]
api/java_util/stream/LongStream/Empty.html#Empty[checkBoxed]
api/java_util/stream/LongStream/Empty.html#Empty[checkDoubles]
api/java_util/stream/IntStream/index.html#RangeClosedEmptyResult[checkBoxed]
api/java_util/stream/IntStream/index.html#RangeClosedEmptyResult[checkDoubles]
api/java_util/stream/IntStream/index.html#RangeClosedEmptyResult[checkLongs]
api/java_util/stream/IntStream/index.html#RangeEmptyResult[checkBoxed]
api/java_util/stream/IntStream/index.html#RangeEmptyResult[checkDoubles]
api/java_util/stream/IntStream/index.html#RangeEmptyResult[checkLongs]
api/java_util/stream/LongStream/index.html#RangeClosedEmptyResult[checkBoxed]
api/java_util/stream/LongStream/index.html#RangeClosedEmptyResult[checkDoubles]
api/java_util/stream/LongStream/index.html#RangeEmptyResult[checkBoxed]
api/java_util/stream/LongStream/index.html#RangeEmptyResult[checkDoubles]
LongStream.empty().boxed().spliterator().tryAdvance((Consumer)null);
LongStream.empty().boxed().spliterator().forEachRemaining((Consumer)null);
IntStream.empty().boxed().spliterator().tryAdvance((Consumer)null);
IntStream.empty().boxed().spliterator().forEachRemaining((Consumer) null);
DoubleStream.empty().boxed().spliterator().tryAdvance((Consumer)null);
DoubleStream.empty().boxed().spliterator().forEachRemaining((Consumer) null);
would not throw anything.
The following JCK tests will fail due to this:
api/java_util/stream/DoubleStream/Empty.html#Empty[checkBoxed]
api/java_util/stream/IntStream/Empty.html#Empty[checkBoxed]
api/java_util/stream/IntStream/Empty.html#Empty[checkDoubles]
api/java_util/stream/IntStream/Empty.html#Empty[checkLongs]
api/java_util/stream/LongStream/Empty.html#Empty[checkBoxed]
api/java_util/stream/LongStream/Empty.html#Empty[checkDoubles]
api/java_util/stream/IntStream/index.html#RangeClosedEmptyResult[checkBoxed]
api/java_util/stream/IntStream/index.html#RangeClosedEmptyResult[checkDoubles]
api/java_util/stream/IntStream/index.html#RangeClosedEmptyResult[checkLongs]
api/java_util/stream/IntStream/index.html#RangeEmptyResult[checkBoxed]
api/java_util/stream/IntStream/index.html#RangeEmptyResult[checkDoubles]
api/java_util/stream/IntStream/index.html#RangeEmptyResult[checkLongs]
api/java_util/stream/LongStream/index.html#RangeClosedEmptyResult[checkBoxed]
api/java_util/stream/LongStream/index.html#RangeClosedEmptyResult[checkDoubles]
api/java_util/stream/LongStream/index.html#RangeEmptyResult[checkBoxed]
api/java_util/stream/LongStream/index.html#RangeEmptyResult[checkDoubles]
- relates to
-
JDK-8019479 An empty spliterator taken from Stream.builder() doesn't throw NPE for null consumers
-
- Closed
-