You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure no NPE is thrown with SerializedFluxSink (#1096)
When the FluxSink is an instance of SerializedFluxSink and the results
contains a null value, a NullPointerException is thrown and the whole process
stops. This is because SerializedFluxSink.next performs a call to
Object.requireNonNull().
To fix this issue we filter out null values from the results.
JAVA-4908
Copy file name to clipboardExpand all lines: driver-reactive-streams/src/test/functional/com/mongodb/reactivestreams/client/internal/BatchCursorFluxTest.java
+27Lines changed: 27 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,7 @@
46
46
importreactor.core.publisher.Hooks;
47
47
importreactor.core.publisher.Mono;
48
48
49
+
importjava.util.Arrays;
49
50
importjava.util.List;
50
51
importjava.util.concurrent.atomic.AtomicBoolean;
51
52
importjava.util.stream.Collectors;
@@ -328,6 +329,32 @@ public void testBatchCursorDoesNotDropAnError() {
328
329
}
329
330
}
330
331
332
+
@Test
333
+
@DisplayName("Ensure no NPE is thrown on null in result set")
0 commit comments