-
Enhancement
-
Resolution: Won't Fix
-
P4
-
None
-
8
-
None
Passing a null array to Arrays.stream results in a NPE, although it is not specified what the behaviour should be so potentially could be modified.
For more null-friendly behaviour, especially when used with flatMap, a null array could map to an empty stream.
Such behaviour would also propagate up to Stream.of, the current implementation of which defers to Arrays.stream, thus no new method such as Stream.ofNullable would be required (as proposed byJDK-8050819)
For more null-friendly behaviour, especially when used with flatMap, a null array could map to an empty stream.
Such behaviour would also propagate up to Stream.of, the current implementation of which defers to Arrays.stream, thus no new method such as Stream.ofNullable would be required (as proposed by
- relates to
-
JDK-8050819 Please add java.util.Stream.ofNullable(T object)
-
- Resolved
-