@Test public void testWithCompletionStageProducingNullWithSharedState() { Supplier<AtomicInteger> boom = () -> null; Multi<Integer> multi = Multi.createBy().repeating() .completionStage(boom, (state) -> CompletableFuture.completedFuture(state.incrementAndGet())) .atMost(2); AssertSubscriber<Integer> subscriber = multi.subscribe() .withSubscriber(AssertSubscriber.create(1)); subscriber.assertHasFailedWith(NullPointerException.class, "supplier"); }
public <S, T> UniRepeat<T> completionStage(Supplier<S> stateSupplier, Function<S, ? extends CompletionStage<? extends T>> producer) { ParameterValidation.nonNull(producer, "producer"); return uni(stateSupplier, s -> Uni.createFrom().completionStage(producer.apply(s))); }
MultiRepetition { public <S, T> UniRepeat<T> completionStage(Supplier<S> stateSupplier, Function<S, ? extends CompletionStage<? extends T>> producer) { ParameterValidation.nonNull(producer, "producer"); return uni(stateSupplier, s -> Uni.createFrom().completionStage(producer.apply(s))); } }
MultiRepetition { public <S, T> UniRepeat<T> completionStage(Supplier<S> stateSupplier, Function<S, ? extends CompletionStage<? extends T>> producer) { ParameterValidation.nonNull(producer, "producer"); return uni(stateSupplier, s -> Uni.createFrom().completionStage(producer.apply(s))); }  }
MultiRepetition { public <S, T> UniRepeat<T> completionStage(Supplier<S> stateSupplier, Function<S, ? extends CompletionStage<? extends T>> producer) { ParameterValidation.nonNull(producer, "producer"); return uni(stateSupplier, s -> Uni.createFrom().completionStage(producer.apply(s))); }  UniRepeat<T> uni(Supplier<S> stateSupplier, Function<S, Uni<? extends T>> producer); UniRepeat<T> uni(Supplier<Uni<? extends T>> uniSupplier); UniRepeat<T> completionStage(Supplier<S> stateSupplier,
            Function<S, ? extends CompletionStage<? extends T>> producer); UniRepeat<T> completionStage(Supplier<? extends CompletionStage<? extends T>> supplier); UniRepeat<T> uni(Supplier<S> stateSupplier,
            BiConsumer<S, UniEmitter<? super T>> consumer); UniRepeat<T> uni(Consumer<UniEmitter<? super T>> consumer); UniRepeat<T> supplier(Supplier<? extends T> supplier); UniRepeat<T> supplier(Supplier<S> stateSupplier, Function<S, ? extends T> producer); }
MultiRepetition { public <S, T> UniRepeat<T> completionStage(Supplier<S> stateSupplier, Function<S, ? extends CompletionStage<? extends T>> producer) { ParameterValidation.nonNull(producer, "producer"); return uni(stateSupplier, s -> Uni.createFrom().completionStage(producer.apply(s))); }  UniRepeat<T> uni(Supplier<S> stateSupplier, Function<S, Uni<? extends T>> producer); UniRepeat<T> uni(Supplier<Uni<? extends T>> uniSupplier); UniRepeat<T> completionStage(Supplier<S> stateSupplier,
            Function<S, ? extends CompletionStage<? extends T>> producer); UniRepeat<T> completionStage(Supplier<? extends CompletionStage<? extends T>> supplier); UniRepeat<T> uni(Supplier<S> stateSupplier,
            BiConsumer<S, UniEmitter<? super T>> consumer); UniRepeat<T> uni(Consumer<UniEmitter<? super T>> consumer); UniRepeat<T> supplier(Supplier<? extends T> supplier); UniRepeat<T> supplier(Supplier<S> stateSupplier, Function<S, ? extends T> producer);  }