From 3481ed1eee9bbdda77435d2c5f698c714ea2fea3 Mon Sep 17 00:00:00 2001 From: Abhimithra Karthikeya Date: Wed, 19 Dec 2018 15:53:43 +0530 Subject: [PATCH] Adding NonNull annotation (#6313) --- src/main/java/io/reactivex/Completable.java | 56 ++++++ src/main/java/io/reactivex/Flowable.java | 210 ++++++++++++++++++++ src/main/java/io/reactivex/Maybe.java | 101 ++++++++++ src/main/java/io/reactivex/Observable.java | 49 +++++ src/main/java/io/reactivex/Single.java | 87 ++++++++ 5 files changed, 503 insertions(+) diff --git a/src/main/java/io/reactivex/Completable.java b/src/main/java/io/reactivex/Completable.java index 948d8aecde..9d8325e3b6 100644 --- a/src/main/java/io/reactivex/Completable.java +++ b/src/main/java/io/reactivex/Completable.java @@ -118,6 +118,7 @@ public abstract class Completable implements CompletableSource { * @throws NullPointerException if sources is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Completable ambArray(final CompletableSource... sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -146,6 +147,7 @@ public static Completable ambArray(final CompletableSource... sources) { * @throws NullPointerException if sources is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Completable amb(final Iterable sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -164,6 +166,7 @@ public static Completable amb(final Iterable source * @return a Completable instance that completes immediately */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Completable complete() { return RxJavaPlugins.onAssembly(CompletableEmpty.INSTANCE); @@ -182,6 +185,7 @@ public static Completable complete() { * @throws NullPointerException if sources is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Completable concatArray(CompletableSource... sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -207,6 +211,7 @@ public static Completable concatArray(CompletableSource... sources) { * @throws NullPointerException if sources is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Completable concat(Iterable sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -253,6 +258,7 @@ public static Completable concat(Publisher sources) * @throws NullPointerException if sources is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) @BackpressureSupport(BackpressureKind.FULL) public static Completable concat(Publisher sources, int prefetch) { @@ -297,6 +303,7 @@ public static Completable concat(Publisher sources, * @see Cancellable */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Completable create(CompletableOnSubscribe source) { ObjectHelper.requireNonNull(source, "source is null"); @@ -319,6 +326,7 @@ public static Completable create(CompletableOnSubscribe source) { * @throws NullPointerException if source is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Completable unsafeCreate(CompletableSource source) { ObjectHelper.requireNonNull(source, "source is null"); @@ -340,6 +348,7 @@ public static Completable unsafeCreate(CompletableSource source) { * @return the Completable instance */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Completable defer(final Callable completableSupplier) { ObjectHelper.requireNonNull(completableSupplier, "completableSupplier"); @@ -363,6 +372,7 @@ public static Completable defer(final Callable comp * @throws NullPointerException if errorSupplier is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Completable error(final Callable errorSupplier) { ObjectHelper.requireNonNull(errorSupplier, "errorSupplier is null"); @@ -382,6 +392,7 @@ public static Completable error(final Callable errorSupplie * @throws NullPointerException if error is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Completable error(final Throwable error) { ObjectHelper.requireNonNull(error, "error is null"); @@ -409,6 +420,7 @@ public static Completable error(final Throwable error) { * @throws NullPointerException if run is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Completable fromAction(final Action run) { ObjectHelper.requireNonNull(run, "run is null"); @@ -435,6 +447,7 @@ public static Completable fromAction(final Action run) { * @return the new Completable instance */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Completable fromCallable(final Callable callable) { ObjectHelper.requireNonNull(callable, "callable is null"); @@ -455,6 +468,7 @@ public static Completable fromCallable(final Callable callable) { * @return the new Completable instance */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Completable fromFuture(final Future future) { ObjectHelper.requireNonNull(future, "future is null"); @@ -479,6 +493,7 @@ public static Completable fromFuture(final Future future) { * @since 2.2 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Completable fromMaybe(final MaybeSource maybe) { ObjectHelper.requireNonNull(maybe, "maybe is null"); @@ -499,6 +514,7 @@ public static Completable fromMaybe(final MaybeSource maybe) { * @throws NullPointerException if run is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Completable fromRunnable(final Runnable run) { ObjectHelper.requireNonNull(run, "run is null"); @@ -520,6 +536,7 @@ public static Completable fromRunnable(final Runnable run) { * @throws NullPointerException if flowable is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Completable fromObservable(final ObservableSource observable) { ObjectHelper.requireNonNull(observable, "observable is null"); @@ -556,6 +573,7 @@ public static Completable fromObservable(final ObservableSource observabl * @see #create(CompletableOnSubscribe) */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public static Completable fromPublisher(final Publisher publisher) { @@ -578,6 +596,7 @@ public static Completable fromPublisher(final Publisher publisher) { * @throws NullPointerException if single is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Completable fromSingle(final SingleSource single) { ObjectHelper.requireNonNull(single, "single is null"); @@ -612,6 +631,7 @@ public static Completable fromSingle(final SingleSource single) { * @see #mergeArrayDelayError(CompletableSource...) */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Completable mergeArray(CompletableSource... sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -652,6 +672,7 @@ public static Completable mergeArray(CompletableSource... sources) { * @see #mergeDelayError(Iterable) */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Completable merge(Iterable sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -753,6 +774,7 @@ public static Completable merge(Publisher sources, * @throws IllegalArgumentException if maxConcurrency is less than 1 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) @BackpressureSupport(BackpressureKind.FULL) private static Completable merge0(Publisher sources, int maxConcurrency, boolean delayErrors) { @@ -776,6 +798,7 @@ private static Completable merge0(Publisher sources * @throws NullPointerException if sources is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Completable mergeArrayDelayError(CompletableSource... sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -797,6 +820,7 @@ public static Completable mergeArrayDelayError(CompletableSource... sources) { * @throws NullPointerException if sources is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Completable mergeDelayError(Iterable sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -902,6 +926,7 @@ public static Completable timer(long delay, TimeUnit unit) { * @return the new Completable instance */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.CUSTOM) public static Completable timer(final long delay, final TimeUnit unit, final Scheduler scheduler) { ObjectHelper.requireNonNull(unit, "unit is null"); @@ -968,6 +993,7 @@ public static Completable using(Callable resourceSupplier, * @return the new Completable instance */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Completable using( final Callable resourceSupplier, @@ -995,6 +1021,7 @@ public static Completable using( * @throws NullPointerException if source is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Completable wrap(CompletableSource source) { ObjectHelper.requireNonNull(source, "source is null"); @@ -1019,6 +1046,7 @@ public static Completable wrap(CompletableSource source) { * @throws NullPointerException if other is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Completable ambWith(CompletableSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -1042,6 +1070,7 @@ public final Completable ambWith(CompletableSource other) { * @throws NullPointerException if next is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Observable andThen(ObservableSource next) { ObjectHelper.requireNonNull(next, "next is null"); @@ -1068,6 +1097,7 @@ public final Observable andThen(ObservableSource next) { * @throws NullPointerException if next is null */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable andThen(Publisher next) { @@ -1092,6 +1122,7 @@ public final Flowable andThen(Publisher next) { * @return Single that composes this Completable and next */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Single andThen(SingleSource next) { ObjectHelper.requireNonNull(next, "next is null"); @@ -1115,6 +1146,7 @@ public final Single andThen(SingleSource next) { * @return Maybe that composes this Completable and next */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe andThen(MaybeSource next) { ObjectHelper.requireNonNull(next, "next is null"); @@ -1207,6 +1239,7 @@ public final void blockingAwait() { * @throws RuntimeException wrapping an InterruptedException if the current thread is interrupted */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final boolean blockingAwait(long timeout, TimeUnit unit) { ObjectHelper.requireNonNull(unit, "unit is null"); @@ -1320,6 +1353,7 @@ public final Completable compose(CompletableTransformer transformer) { * @see #andThen(Publisher) */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Completable concatWith(CompletableSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -1383,6 +1417,7 @@ public final Completable delay(long delay, TimeUnit unit, Scheduler scheduler) { * @throws NullPointerException if unit or scheduler is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.CUSTOM) public final Completable delay(final long delay, final TimeUnit unit, final Scheduler scheduler, final boolean delayError) { ObjectHelper.requireNonNull(unit, "unit is null"); @@ -1514,6 +1549,7 @@ public final Completable doOnError(Consumer onError) { * @throws NullPointerException if onEvent is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Completable doOnEvent(final Consumer onEvent) { ObjectHelper.requireNonNull(onEvent, "onEvent is null"); @@ -1535,6 +1571,7 @@ public final Completable doOnEvent(final Consumer onEvent) { * @return the new Completable instance */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) private Completable doOnLifecycle( final Consumer onSubscribe, @@ -1639,6 +1676,7 @@ public final Completable doAfterTerminate(final Action onAfterTerminate) { * @since 2.1 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Completable doFinally(Action onFinally) { ObjectHelper.requireNonNull(onFinally, "onFinally is null"); @@ -1776,6 +1814,7 @@ public final Completable doFinally(Action onFinally) { * @see #compose(CompletableTransformer) */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Completable lift(final CompletableOperator onLift) { ObjectHelper.requireNonNull(onLift, "onLift is null"); @@ -1817,6 +1856,7 @@ public final Single> materialize() { * @throws NullPointerException if other is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Completable mergeWith(CompletableSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -1836,6 +1876,7 @@ public final Completable mergeWith(CompletableSource other) { * @throws NullPointerException if scheduler is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.CUSTOM) public final Completable observeOn(final Scheduler scheduler) { ObjectHelper.requireNonNull(scheduler, "scheduler is null"); @@ -1873,6 +1914,7 @@ public final Completable onErrorComplete() { * @return the new Completable instance */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Completable onErrorComplete(final Predicate predicate) { ObjectHelper.requireNonNull(predicate, "predicate is null"); @@ -1895,6 +1937,7 @@ public final Completable onErrorComplete(final Predicate pred * @return the new Completable instance */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Completable onErrorResumeNext(final Function errorMapper) { ObjectHelper.requireNonNull(errorMapper, "errorMapper is null"); @@ -2153,6 +2196,7 @@ public final Completable retryWhen(Function, ? exten * @throws NullPointerException if other is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Completable startWith(CompletableSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -2174,6 +2218,7 @@ public final Completable startWith(CompletableSource other) { * @throws NullPointerException if other is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Observable startWith(Observable other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -2197,6 +2242,7 @@ public final Observable startWith(Observable other) { * @throws NullPointerException if other is null */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable startWith(Publisher other) { @@ -2319,6 +2365,7 @@ public final E subscribeWith(E observer) { * @throws NullPointerException if either callback is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Disposable subscribe(final Action onComplete, final Consumer onError) { ObjectHelper.requireNonNull(onError, "onError is null"); @@ -2346,6 +2393,7 @@ public final Disposable subscribe(final Action onComplete, final Consumer Observable toObservable() { * @throws NullPointerException if completionValueSupplier is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Single toSingle(final Callable completionValueSupplier) { ObjectHelper.requireNonNull(completionValueSupplier, "completionValueSupplier is null"); @@ -2646,6 +2700,7 @@ public final Single toSingle(final Callable completionValueS * @throws NullPointerException if completionValue is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Single toSingleDefault(final T completionValue) { ObjectHelper.requireNonNull(completionValue, "completionValue is null"); @@ -2666,6 +2721,7 @@ public final Single toSingleDefault(final T completionValue) { * @throws NullPointerException if scheduler is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.CUSTOM) public final Completable unsubscribeOn(final Scheduler scheduler) { ObjectHelper.requireNonNull(scheduler, "scheduler is null"); diff --git a/src/main/java/io/reactivex/Flowable.java b/src/main/java/io/reactivex/Flowable.java index 77964b0fad..0b33a191a2 100644 --- a/src/main/java/io/reactivex/Flowable.java +++ b/src/main/java/io/reactivex/Flowable.java @@ -87,6 +87,7 @@ public abstract class Flowable implements Publisher { * @see ReactiveX operators documentation: Amb */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable amb(Iterable> sources) { @@ -116,6 +117,7 @@ public static Flowable amb(Iterable> sou * @see ReactiveX operators documentation: Amb */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable ambArray(Publisher... sources) { @@ -269,6 +271,7 @@ public static Flowable combineLatest(Function Flowable combineLatest(Publisher[] sources, Function combiner, int bufferSize) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -366,6 +369,7 @@ public static Flowable combineLatest(Iterable Flowable combineLatest(Iterable> sources, Function combiner, int bufferSize) { @@ -556,6 +560,7 @@ public static Flowable combineLatestDelayError(Function Flowable combineLatestDelayError(Publisher[] sources, Function combiner, int bufferSize) { @@ -747,6 +752,7 @@ public static Flowable combineLatest( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable combineLatest( @@ -799,6 +805,7 @@ public static Flowable combineLatest( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable combineLatest( @@ -855,6 +862,7 @@ public static Flowable combineLatest( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable combineLatest( @@ -916,6 +924,7 @@ public static Flowable combineLatest( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable combineLatest( @@ -981,6 +990,7 @@ public static Flowable combineLatest( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable combineLatest( @@ -1051,6 +1061,7 @@ public static Flowable combineLatest( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable combineLatest( @@ -1125,6 +1136,7 @@ public static Flowable combineLatest( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable combineLatest( @@ -1166,6 +1178,7 @@ public static Flowable combineLatest( */ @SuppressWarnings({ "unchecked", "rawtypes" }) @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable concat(Iterable> sources) { @@ -1261,6 +1274,7 @@ public static Flowable concat(Publisher> */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable concat(Publisher source1, Publisher source2) { @@ -1297,6 +1311,7 @@ public static Flowable concat(Publisher source1, Publisher Flowable concat( @@ -1338,6 +1353,7 @@ public static Flowable concat( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable concat( @@ -1470,6 +1486,7 @@ public static Flowable concatArrayEager(Publisher... sources * @since 2.0 */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings({ "rawtypes", "unchecked" }) @@ -1564,6 +1581,7 @@ public static Flowable concatArrayEagerDelayError(int maxConcurrency, int */ @SuppressWarnings({ "unchecked", "rawtypes" }) @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable concatDelayError(Iterable> sources) { @@ -1668,6 +1686,7 @@ public static Flowable concatEager(Publisher Flowable concatEager(Iterable Flowable concatEager(Iterable Flowable create(FlowableOnSubscribe source, BackpressureStrategy mode) { @@ -1820,6 +1841,7 @@ public static Flowable create(FlowableOnSubscribe source, Backpressure * @see ReactiveX operators documentation: Defer */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable defer(Callable> supplier) { @@ -1874,6 +1896,7 @@ public static Flowable empty() { * @see ReactiveX operators documentation: Throw */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable error(Callable supplier) { @@ -1902,6 +1925,7 @@ public static Flowable error(Callable supplier) { * @see ReactiveX operators documentation: Throw */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable error(final Throwable throwable) { @@ -1929,6 +1953,7 @@ public static Flowable error(final Throwable throwable) { * @see ReactiveX operators documentation: From */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable fromArray(T... items) { @@ -1974,6 +1999,7 @@ public static Flowable fromArray(T... items) { * @since 2.0 */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable fromCallable(Callable supplier) { @@ -2010,6 +2036,7 @@ public static Flowable fromCallable(Callable supplier) { * @see ReactiveX operators documentation: From */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable fromFuture(Future future) { @@ -2050,6 +2077,7 @@ public static Flowable fromFuture(Future future) { * @see ReactiveX operators documentation: From */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable fromFuture(Future future, long timeout, TimeUnit unit) { @@ -2095,6 +2123,7 @@ public static Flowable fromFuture(Future future, long timeou */ @SuppressWarnings({ "unchecked", "cast" }) @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public static Flowable fromFuture(Future future, long timeout, TimeUnit unit, Scheduler scheduler) { @@ -2133,6 +2162,7 @@ public static Flowable fromFuture(Future future, long timeou */ @SuppressWarnings({ "cast", "unchecked" }) @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public static Flowable fromFuture(Future future, Scheduler scheduler) { @@ -2161,6 +2191,7 @@ public static Flowable fromFuture(Future future, Scheduler s * @see ReactiveX operators documentation: From */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable fromIterable(Iterable source) { @@ -2196,6 +2227,7 @@ public static Flowable fromIterable(Iterable source) { * @see #create(FlowableOnSubscribe, BackpressureStrategy) */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") @@ -2230,6 +2262,7 @@ public static Flowable fromPublisher(final Publisher source) * @return the new Flowable instance */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable generate(final Consumer> generator) { @@ -2263,6 +2296,7 @@ public static Flowable generate(final Consumer> generator) { * @return the new Flowable instance */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable generate(Callable initialState, final BiConsumer> generator) { @@ -2297,6 +2331,7 @@ public static Flowable generate(Callable initialState, final BiCons * @return the new Flowable instance */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable generate(Callable initialState, final BiConsumer> generator, @@ -2363,6 +2398,7 @@ public static Flowable generate(Callable initialState, BiFunction Flowable generate(Callable initialState, BiFunction, S> generator, Consumer disposeState) { @@ -2432,6 +2468,7 @@ public static Flowable interval(long initialDelay, long period, TimeUnit u * @since 1.0.12 */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.CUSTOM) public static Flowable interval(long initialDelay, long period, TimeUnit unit, Scheduler scheduler) { @@ -2539,6 +2576,7 @@ public static Flowable intervalRange(long start, long count, long initialD * @return the new Flowable instance */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.CUSTOM) public static Flowable intervalRange(long start, long count, long initialDelay, long period, TimeUnit unit, Scheduler scheduler) { @@ -2590,6 +2628,7 @@ public static Flowable intervalRange(long start, long count, long initialD * @see #fromIterable(Iterable) */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable just(T item) { @@ -2619,6 +2658,7 @@ public static Flowable just(T item) { */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable just(T item1, T item2) { @@ -2652,6 +2692,7 @@ public static Flowable just(T item1, T item2) { */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable just(T item1, T item2, T item3) { @@ -2688,6 +2729,7 @@ public static Flowable just(T item1, T item2, T item3) { */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable just(T item1, T item2, T item3, T item4) { @@ -2727,6 +2769,7 @@ public static Flowable just(T item1, T item2, T item3, T item4) { */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable just(T item1, T item2, T item3, T item4, T item5) { @@ -2769,6 +2812,7 @@ public static Flowable just(T item1, T item2, T item3, T item4, T item5) */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable just(T item1, T item2, T item3, T item4, T item5, T item6) { @@ -2814,6 +2858,7 @@ public static Flowable just(T item1, T item2, T item3, T item4, T item5, */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable just(T item1, T item2, T item3, T item4, T item5, T item6, T item7) { @@ -2862,6 +2907,7 @@ public static Flowable just(T item1, T item2, T item3, T item4, T item5, */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable just(T item1, T item2, T item3, T item4, T item5, T item6, T item7, T item8) { @@ -2913,6 +2959,7 @@ public static Flowable just(T item1, T item2, T item3, T item4, T item5, */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable just(T item1, T item2, T item3, T item4, T item5, T item6, T item7, T item8, T item9) { @@ -2967,6 +3014,7 @@ public static Flowable just(T item1, T item2, T item3, T item4, T item5, */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable just(T item1, T item2, T item3, T item4, T item5, T item6, T item7, T item8, T item9, T item10) { @@ -3357,6 +3405,7 @@ public static Flowable mergeArray(Publisher... sources) { */ @SuppressWarnings({ "unchecked", "rawtypes" }) @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable merge(Publisher source1, Publisher source2) { @@ -3406,6 +3455,7 @@ public static Flowable merge(Publisher source1, Publisher Flowable merge(Publisher source1, Publisher source2, Publisher source3) { @@ -3458,6 +3508,7 @@ public static Flowable merge(Publisher source1, Publisher Flowable merge( @@ -3767,6 +3818,7 @@ public static Flowable mergeArrayDelayError(Publisher... sou */ @SuppressWarnings({ "unchecked", "rawtypes" }) @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable mergeDelayError(Publisher source1, Publisher source2) { @@ -3809,6 +3861,7 @@ public static Flowable mergeDelayError(Publisher source1, Pu */ @SuppressWarnings({ "unchecked", "rawtypes" }) @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable mergeDelayError(Publisher source1, Publisher source2, Publisher source3) { @@ -3854,6 +3907,7 @@ public static Flowable mergeDelayError(Publisher source1, Pu */ @SuppressWarnings({ "unchecked", "rawtypes" }) @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable mergeDelayError( @@ -4069,6 +4123,7 @@ public static Single sequenceEqual(Publisher source1, * @see ReactiveX operators documentation: SequenceEqual */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Single sequenceEqual(Publisher source1, Publisher source2, @@ -4319,6 +4374,7 @@ public static Flowable timer(long delay, TimeUnit unit) { * @see ReactiveX operators documentation: Timer */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.CUSTOM) public static Flowable timer(long delay, TimeUnit unit, Scheduler scheduler) { @@ -4347,6 +4403,7 @@ public static Flowable timer(long delay, TimeUnit unit, Scheduler schedule * instead. */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.NONE) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable unsafeCreate(Publisher onSubscribe) { @@ -4420,6 +4477,7 @@ public static Flowable using(Callable resourceSupplier, * @since 2.0 */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable using(Callable resourceSupplier, @@ -4476,6 +4534,7 @@ public static Flowable using(Callable resourceSupplier, * @see ReactiveX operators documentation: Zip */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable zip(Iterable> sources, Function zipper) { @@ -4530,6 +4589,7 @@ public static Flowable zip(Iterable> */ @SuppressWarnings({ "rawtypes", "unchecked", "cast" }) @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable zip(Publisher> sources, @@ -4588,6 +4648,7 @@ public static Flowable zip(Publisher> */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable zip( @@ -4649,6 +4710,7 @@ public static Flowable zip( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable zip( @@ -4711,6 +4773,7 @@ public static Flowable zip( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable zip( @@ -4775,6 +4838,7 @@ public static Flowable zip( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable zip( @@ -4843,6 +4907,7 @@ public static Flowable zip( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable zip( @@ -4916,6 +4981,7 @@ public static Flowable zip( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable zip( @@ -4992,6 +5058,7 @@ public static Flowable zip( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable zip( @@ -5072,6 +5139,7 @@ public static Flowable zip( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable zip( @@ -5157,6 +5225,7 @@ public static Flowable zip( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable zip( @@ -5246,6 +5315,7 @@ public static Flowable zip( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable zip( @@ -5316,6 +5386,7 @@ public static Flowable zip( * @see ReactiveX operators documentation: Zip */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable zipArray(Function zipper, @@ -5378,6 +5449,7 @@ public static Flowable zipArray(FunctionReactiveX operators documentation: Zip */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable zipIterable(Iterable> sources, @@ -5413,6 +5485,7 @@ public static Flowable zipIterable(IterableReactiveX operators documentation: All */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single all(Predicate predicate) { @@ -5442,6 +5515,7 @@ public final Single all(Predicate predicate) { */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable ambWith(Publisher other) { @@ -5473,6 +5547,7 @@ public final Flowable ambWith(Publisher other) { * @see ReactiveX operators documentation: Contains */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single any(Predicate predicate) { @@ -6203,6 +6278,7 @@ public final Flowable> buffer(int count, int skip) { * @see ReactiveX operators documentation: Buffer */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final > Flowable buffer(int count, int skip, Callable bufferSupplier) { @@ -6352,6 +6428,7 @@ public final Flowable> buffer(long timespan, long timeskip, TimeUnit uni * @see ReactiveX operators documentation: Buffer */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.CUSTOM) public final > Flowable buffer(long timespan, long timeskip, TimeUnit unit, @@ -6965,6 +7042,7 @@ public final Flowable cacheWithInitialCapacity(int initialCapacity) { * @see ReactiveX operators documentation: Map */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable cast(final Class clazz) { @@ -7002,6 +7080,7 @@ public final Flowable cast(final Class clazz) { * @see ReactiveX operators documentation: Reduce */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single collect(Callable initialItemSupplier, BiConsumer collector) { @@ -7040,6 +7119,7 @@ public final Single collect(Callable initialItemSupplier, Bi * @see ReactiveX operators documentation: Reduce */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single collectInto(final U initialItem, BiConsumer collector) { @@ -7137,6 +7217,7 @@ public final Flowable concatMap(FunctionReactiveX operators documentation: FlatMap */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable concatMap(Function> mapper, int prefetch) { @@ -7205,6 +7286,7 @@ public final Completable concatMapCompletable(Function mapper, int prefetch) { @@ -7307,6 +7389,7 @@ public final Completable concatMapCompletableDelayError(Function mapper, boolean tillTheEnd, int prefetch) { @@ -7370,6 +7453,7 @@ public final Flowable concatMapDelayError(Function Flowable concatMapDelayError(Function> mapper, @@ -7437,6 +7521,7 @@ public final Flowable concatMapEager(Function Flowable concatMapEager(Function> mapper, @@ -7506,6 +7591,7 @@ public final Flowable concatMapEagerDelayError(Function Flowable concatMapEagerDelayError(Function> mapper, @@ -7570,6 +7656,7 @@ public final Flowable concatMapIterable(FunctionReactiveX operators documentation: FlatMap */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable concatMapIterable(final Function> mapper, int prefetch) { @@ -7638,6 +7725,7 @@ public final Flowable concatMapMaybe(Function Flowable concatMapMaybe(Function> mapper, int prefetch) { @@ -7748,6 +7836,7 @@ public final Flowable concatMapMaybeDelayError(Function Flowable concatMapMaybeDelayError(Function> mapper, boolean tillTheEnd, int prefetch) { @@ -7816,6 +7905,7 @@ public final Flowable concatMapSingle(Function Flowable concatMapSingle(Function> mapper, int prefetch) { @@ -7926,6 +8016,7 @@ public final Flowable concatMapSingleDelayError(Function Flowable concatMapSingleDelayError(Function> mapper, boolean tillTheEnd, int prefetch) { @@ -7955,6 +8046,7 @@ public final Flowable concatMapSingleDelayError(FunctionReactiveX operators documentation: Concat */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable concatWith(Publisher other) { @@ -8059,6 +8151,7 @@ public final Flowable concatWith(@NonNull CompletableSource other) { * @see ReactiveX operators documentation: Contains */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single contains(final Object item) { @@ -8114,6 +8207,7 @@ public final Single count() { * @see RxJava wiki: Backpressure */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable debounce(Function> debounceIndicator) { @@ -8187,6 +8281,7 @@ public final Flowable debounce(long timeout, TimeUnit unit) { * @see #throttleWithTimeout(long, TimeUnit, Scheduler) */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable debounce(long timeout, TimeUnit unit, Scheduler scheduler) { @@ -8217,6 +8312,7 @@ public final Flowable debounce(long timeout, TimeUnit unit, Scheduler schedul * @see ReactiveX operators documentation: DefaultIfEmpty */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable defaultIfEmpty(T defaultItem) { @@ -8252,6 +8348,7 @@ public final Flowable defaultIfEmpty(T defaultItem) { * @see ReactiveX operators documentation: Delay */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable delay(final Function> itemDelayIndicator) { @@ -8367,6 +8464,7 @@ public final Flowable delay(long delay, TimeUnit unit, Scheduler scheduler) { * @see ReactiveX operators documentation: Delay */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable delay(long delay, TimeUnit unit, Scheduler scheduler, boolean delayError) { @@ -8435,6 +8533,7 @@ public final Flowable delay(Publisher subscriptionIndicator, * @since 2.0 */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable delaySubscription(Publisher subscriptionIndicator) { @@ -8598,6 +8697,7 @@ public final Flowable dematerialize() { */ @Experimental @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) @BackpressureSupport(BackpressureKind.PASS_THROUGH) public final Flowable dematerialize(Function> selector) { @@ -9011,6 +9111,7 @@ public final Flowable doOnComplete(Action onComplete) { * @see ReactiveX operators documentation: Do */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) private Flowable doOnEach(Consumer onNext, Consumer onError, @@ -9040,6 +9141,7 @@ private Flowable doOnEach(Consumer onNext, ConsumerReactiveX operators documentation: Do */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable doOnEach(final Consumer> onNotification) { @@ -9076,6 +9178,7 @@ public final Flowable doOnEach(final Consumer> onNoti * @see ReactiveX operators documentation: Do */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable doOnEach(final Subscriber subscriber) { @@ -9138,6 +9241,7 @@ public final Flowable doOnError(Consumer onError) { * @see ReactiveX operators documentation: Do */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable doOnLifecycle(final Consumer onSubscribe, @@ -9312,6 +9416,7 @@ public final Maybe elementAt(long index) { * @see ReactiveX operators documentation: ElementAt */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single elementAt(long index, T defaultItem) { @@ -9373,6 +9478,7 @@ public final Single elementAtOrError(long index) { * @see ReactiveX operators documentation: Filter */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable filter(Predicate predicate) { @@ -9629,6 +9735,7 @@ public final Flowable flatMap(Function Flowable flatMap(Function> mapper, @@ -9677,6 +9784,7 @@ public final Flowable flatMap(FunctionReactiveX operators documentation: FlatMap */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable flatMap( @@ -9723,6 +9831,7 @@ public final Flowable flatMap( * @since 2.0 */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable flatMap( @@ -9893,6 +10002,7 @@ public final Flowable flatMap(Function Flowable flatMap(final Function> mapper, @@ -9981,6 +10091,7 @@ public final Completable flatMapCompletable(Function mapper, boolean delayErrors, int maxConcurrency) { @@ -10045,6 +10156,7 @@ public final Flowable flatMapIterable(final FunctionReactiveX operators documentation: FlatMap */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable flatMapIterable(final Function> mapper, int bufferSize) { @@ -10081,6 +10193,7 @@ public final Flowable flatMapIterable(final FunctionReactiveX operators documentation: FlatMap */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable flatMapIterable(final Function> mapper, @@ -10123,6 +10236,7 @@ public final Flowable flatMapIterable(final Function Flowable flatMapIterable(final Function> mapper, @@ -10172,6 +10286,7 @@ public final Flowable flatMapMaybe(Function Flowable flatMapMaybe(Function> mapper, boolean delayErrors, int maxConcurrency) { @@ -10220,6 +10335,7 @@ public final Flowable flatMapSingle(Function Flowable flatMapSingle(Function> mapper, boolean delayErrors, int maxConcurrency) { @@ -10340,6 +10456,7 @@ public final Disposable forEachWhile(Predicate onNext, ConsumerReactiveX operators documentation: Subscribe */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.NONE) @SchedulerSupport(SchedulerSupport.NONE) public final Disposable forEachWhile(final Predicate onNext, final Consumer onError, @@ -10611,6 +10728,7 @@ public final Flowable> groupBy(FunctionReactiveX operators documentation: GroupBy */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable> groupBy(Function keySelector, @@ -10723,6 +10841,7 @@ public final Flowable> groupBy(Function Flowable> groupBy(Function keySelector, @@ -10772,6 +10891,7 @@ public final Flowable> groupBy(FunctionReactiveX operators documentation: Join */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable groupJoin( @@ -10893,6 +11013,7 @@ public final Single isEmpty() { * @see ReactiveX operators documentation: Join */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable join( @@ -10950,6 +11071,7 @@ public final Maybe lastElement() { * @see ReactiveX operators documentation: Last */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single last(T defaultItem) { @@ -11127,6 +11249,7 @@ public final Single lastOrError() { * @see #compose(FlowableTransformer) */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.SPECIAL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable lift(FlowableOperator lifter) { @@ -11201,6 +11324,7 @@ public final Flowable limit(long count) { * @see ReactiveX operators documentation: Map */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable map(Function mapper) { @@ -11254,6 +11378,7 @@ public final Flowable> materialize() { * @see ReactiveX operators documentation: Merge */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable mergeWith(Publisher other) { @@ -11281,6 +11406,7 @@ public final Flowable mergeWith(Publisher other) { * @since 2.2 */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable mergeWith(@NonNull SingleSource other) { @@ -11309,6 +11435,7 @@ public final Flowable mergeWith(@NonNull SingleSource other) { * @since 2.2 */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable mergeWith(@NonNull MaybeSource other) { @@ -11334,6 +11461,7 @@ public final Flowable mergeWith(@NonNull MaybeSource other) { * @since 2.2 */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable mergeWith(@NonNull CompletableSource other) { @@ -11446,6 +11574,7 @@ public final Flowable observeOn(Scheduler scheduler, boolean delayError) { * @see #observeOn(Scheduler, boolean) */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable observeOn(Scheduler scheduler, boolean delayError, int bufferSize) { @@ -11473,6 +11602,7 @@ public final Flowable observeOn(Scheduler scheduler, boolean delayError, int * @see ReactiveX operators documentation: Filter */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable ofType(final Class clazz) { @@ -11649,6 +11779,7 @@ public final Flowable onBackpressureBuffer(int capacity, boolean delayError, * @since 1.1.0 */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.SPECIAL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable onBackpressureBuffer(int capacity, boolean delayError, boolean unbounded, @@ -11720,6 +11851,7 @@ public final Flowable onBackpressureBuffer(int capacity, Action onOverflow) { * @since 2.0 */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.SPECIAL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable onBackpressureBuffer(long capacity, Action onOverflow, BackpressureOverflowStrategy overflowStrategy) { @@ -11776,6 +11908,7 @@ public final Flowable onBackpressureDrop() { * @since 1.1.0 */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable onBackpressureDrop(Consumer onDrop) { @@ -11851,6 +11984,7 @@ public final Flowable onBackpressureLatest() { * @see ReactiveX operators documentation: Catch */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable onErrorResumeNext(Function> resumeFunction) { @@ -11894,6 +12028,7 @@ public final Flowable onErrorResumeNext(FunctionReactiveX operators documentation: Catch */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable onErrorResumeNext(final Publisher next) { @@ -11933,6 +12068,7 @@ public final Flowable onErrorResumeNext(final Publisher next) { * @see ReactiveX operators documentation: Catch */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable onErrorReturn(Function valueSupplier) { @@ -11972,6 +12108,7 @@ public final Flowable onErrorReturn(Function * @see ReactiveX operators documentation: Catch */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable onErrorReturnItem(final T item) { @@ -12018,6 +12155,7 @@ public final Flowable onErrorReturnItem(final T item) { * @see ReactiveX operators documentation: Catch */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable onExceptionResumeNext(final Publisher next) { @@ -12226,6 +12364,7 @@ public final Flowable publish(Function, ? extends Pub * @see ReactiveX operators documentation: Publish */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable publish(Function, ? extends Publisher> selector, int prefetch) { @@ -12320,6 +12459,7 @@ public final Flowable rebatchRequests(int n) { * @see Wikipedia: Fold (higher-order function) */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Maybe reduce(BiFunction reducer) { @@ -12381,6 +12521,7 @@ public final Maybe reduce(BiFunction reducer) { * @see #reduceWith(Callable, BiFunction) */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single reduce(R seed, BiFunction reducer) { @@ -12425,6 +12566,7 @@ public final Single reduce(R seed, BiFunction reducer) { * @see Wikipedia: Fold (higher-order function) */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single reduceWith(Callable seedSupplier, BiFunction reducer) { @@ -12512,6 +12654,7 @@ public final Flowable repeat(long times) { * @see ReactiveX operators documentation: Repeat */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable repeatUntil(BooleanSupplier stop) { @@ -12542,6 +12685,7 @@ public final Flowable repeatUntil(BooleanSupplier stop) { * @see ReactiveX operators documentation: Repeat */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable repeatWhen(final Function, ? extends Publisher> handler) { @@ -12600,6 +12744,7 @@ public final ConnectableFlowable replay() { * @see ReactiveX operators documentation: Replay */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable replay(Function, ? extends Publisher> selector) { @@ -12638,6 +12783,7 @@ public final Flowable replay(Function, ? extends Publ * @see ReactiveX operators documentation: Replay */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable replay(Function, ? extends Publisher> selector, final int bufferSize) { @@ -12728,6 +12874,7 @@ public final Flowable replay(Function, ? extends Publ * @see ReactiveX operators documentation: Replay */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable replay(Function, ? extends Publisher> selector, final int bufferSize, final long time, final TimeUnit unit, final Scheduler scheduler) { @@ -12772,6 +12919,7 @@ public final Flowable replay(Function, ? extends Publ * @see ReactiveX operators documentation: Replay */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable replay(final Function, ? extends Publisher> selector, final int bufferSize, final Scheduler scheduler) { @@ -12851,6 +12999,7 @@ public final Flowable replay(Function, ? extends Publ * @see ReactiveX operators documentation: Replay */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable replay(Function, ? extends Publisher> selector, final long time, final TimeUnit unit, final Scheduler scheduler) { @@ -12887,6 +13036,7 @@ public final Flowable replay(Function, ? extends Publ * @see ReactiveX operators documentation: Replay */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable replay(final Function, ? extends Publisher> selector, final Scheduler scheduler) { @@ -13195,6 +13345,7 @@ public final Flowable retry() { * @see ReactiveX operators documentation: Retry */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable retry(BiPredicate predicate) { @@ -13252,6 +13403,7 @@ public final Flowable retry(long count) { * @return the new Flowable instance */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable retry(long times, Predicate predicate) { @@ -13296,6 +13448,7 @@ public final Flowable retry(Predicate predicate) { * @return the new Flowable instance */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable retryUntil(final BooleanSupplier stop) { @@ -13381,6 +13534,7 @@ public final Flowable retryUntil(final BooleanSupplier stop) { * @see ReactiveX operators documentation: Retry */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable retryWhen( @@ -13504,6 +13658,7 @@ public final Flowable sample(long period, TimeUnit unit, boolean emitLast) { * @see #throttleLast(long, TimeUnit, Scheduler) */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable sample(long period, TimeUnit unit, Scheduler scheduler) { @@ -13544,6 +13699,7 @@ public final Flowable sample(long period, TimeUnit unit, Scheduler scheduler) * @since 2.1 */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable sample(long period, TimeUnit unit, Scheduler scheduler, boolean emitLast) { @@ -13575,6 +13731,7 @@ public final Flowable sample(long period, TimeUnit unit, Scheduler scheduler, * @see RxJava wiki: Backpressure */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable sample(Publisher sampler) { @@ -13612,6 +13769,7 @@ public final Flowable sample(Publisher sampler) { * @since 2.1 */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable sample(Publisher sampler, boolean emitLast) { @@ -13644,6 +13802,7 @@ public final Flowable sample(Publisher sampler, boolean emitLast) { * @see ReactiveX operators documentation: Scan */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable scan(BiFunction accumulator) { @@ -13697,6 +13856,7 @@ public final Flowable scan(BiFunction accumulator) { * @see ReactiveX operators documentation: Scan */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable scan(final R initialValue, BiFunction accumulator) { @@ -13736,6 +13896,7 @@ public final Flowable scan(final R initialValue, BiFunctionReactiveX operators documentation: Scan */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable scanWith(Callable seedSupplier, BiFunction accumulator) { @@ -13847,6 +14008,7 @@ public final Maybe singleElement() { * @see ReactiveX operators documentation: First */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single single(T defaultItem) { @@ -14168,6 +14330,7 @@ public final Flowable skipLast(long time, TimeUnit unit, Scheduler scheduler, * @see ReactiveX operators documentation: SkipLast */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable skipLast(long time, TimeUnit unit, Scheduler scheduler, boolean delayError, int bufferSize) { @@ -14201,6 +14364,7 @@ public final Flowable skipLast(long time, TimeUnit unit, Scheduler scheduler, * @see ReactiveX operators documentation: SkipUntil */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable skipUntil(Publisher other) { @@ -14228,6 +14392,7 @@ public final Flowable skipUntil(Publisher other) { * @see ReactiveX operators documentation: SkipWhile */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable skipWhile(Predicate predicate) { @@ -14283,6 +14448,7 @@ public final Flowable sorted() { * @return a Flowable that emits the items emitted by the source Publisher in sorted order */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable sorted(Comparator sortFunction) { @@ -14340,6 +14506,7 @@ public final Flowable startWith(Iterable items) { */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable startWith(Publisher other) { @@ -14369,6 +14536,7 @@ public final Flowable startWith(Publisher other) { */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable startWith(T value) { @@ -14559,6 +14727,7 @@ public final Disposable subscribe(Consumer onNext, ConsumerReactiveX operators documentation: Subscribe */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.SPECIAL) @SchedulerSupport(SchedulerSupport.NONE) public final Disposable subscribe(Consumer onNext, Consumer onError, @@ -14719,6 +14888,7 @@ public final > E subscribeWith(E subscriber) { * @see #subscribeOn(Scheduler, boolean) */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable subscribeOn(@NonNull Scheduler scheduler) { @@ -14756,6 +14926,7 @@ public final Flowable subscribeOn(@NonNull Scheduler scheduler) { * @since 2.2 */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable subscribeOn(@NonNull Scheduler scheduler, boolean requestOn) { @@ -14786,6 +14957,7 @@ public final Flowable subscribeOn(@NonNull Scheduler scheduler, boolean reque * @since 1.1.0 */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable switchIfEmpty(Publisher other) { @@ -14899,6 +15071,7 @@ public final Flowable switchMap(Function mapper) { @@ -14945,6 +15118,7 @@ public final Completable switchMapCompletable(@NonNull Function mapper) { @@ -15071,6 +15245,7 @@ Flowable switchMap0(Function> * @since 2.2 */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable switchMapMaybe(@NonNull Function> mapper) { @@ -15101,6 +15276,7 @@ public final Flowable switchMapMaybe(@NonNull Function Flowable switchMapMaybeDelayError(@NonNull Function> mapper) { @@ -15141,6 +15317,7 @@ public final Flowable switchMapMaybeDelayError(@NonNull Function Flowable switchMapSingle(@NonNull Function> mapper) { @@ -15171,6 +15348,7 @@ public final Flowable switchMapSingle(@NonNull Function Flowable switchMapSingleDelayError(@NonNull Function> mapper) { @@ -15414,6 +15592,7 @@ public final Flowable takeLast(long count, long time, TimeUnit unit, Schedule * @see ReactiveX operators documentation: TakeLast */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable takeLast(long count, long time, TimeUnit unit, Scheduler scheduler, boolean delayError, int bufferSize) { @@ -15625,6 +15804,7 @@ public final Flowable takeLast(long time, TimeUnit unit, Scheduler scheduler, * @since 1.1.0 */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable takeUntil(Predicate stopPredicate) { @@ -15654,6 +15834,7 @@ public final Flowable takeUntil(Predicate stopPredicate) { * @see ReactiveX operators documentation: TakeUntil */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable takeUntil(Publisher other) { @@ -15682,6 +15863,7 @@ public final Flowable takeUntil(Publisher other) { * @see Flowable#takeUntil(Predicate) */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable takeWhile(Predicate predicate) { @@ -15746,6 +15928,7 @@ public final Flowable throttleFirst(long windowDuration, TimeUnit unit) { * @see RxJava wiki: Backpressure */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable throttleFirst(long skipDuration, TimeUnit unit, Scheduler scheduler) { @@ -15965,6 +16148,7 @@ public final Flowable throttleLatest(long timeout, TimeUnit unit, Scheduler s * @since 2.2 */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable throttleLatest(long timeout, TimeUnit unit, Scheduler scheduler, boolean emitLast) { @@ -16218,6 +16402,7 @@ public final Flowable timeout(Function> * @see ReactiveX operators documentation: Timeout */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable timeout(Function> itemTimeoutIndicator, Flowable other) { @@ -16280,6 +16465,7 @@ public final Flowable timeout(long timeout, TimeUnit timeUnit) { * @see ReactiveX operators documentation: Timeout */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Flowable timeout(long timeout, TimeUnit timeUnit, Publisher other) { @@ -16316,6 +16502,7 @@ public final Flowable timeout(long timeout, TimeUnit timeUnit, PublisherReactiveX operators documentation: Timeout */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable timeout(long timeout, TimeUnit timeUnit, Scheduler scheduler, Publisher other) { @@ -16387,6 +16574,7 @@ public final Flowable timeout(long timeout, TimeUnit timeUnit, Scheduler sche * @see ReactiveX operators documentation: Timeout */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable timeout(Publisher firstTimeoutIndicator, @@ -16432,6 +16620,7 @@ public final Flowable timeout(Publisher firstTimeoutIndicator, * @see ReactiveX operators documentation: Timeout */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable timeout( @@ -16556,6 +16745,7 @@ public final Flowable> timestamp(TimeUnit unit) { * @see ReactiveX operators documentation: Timestamp */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) // Supplied scheduler is only used for creating timestamps. public final Flowable> timestamp(final TimeUnit unit, final Scheduler scheduler) { @@ -16726,6 +16916,7 @@ public final > Single toList(Callable coll * @see ReactiveX operators documentation: To */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single> toMap(final Function keySelector) { @@ -16764,6 +16955,7 @@ public final Single> toMap(final Function * @see ReactiveX operators documentation: To */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single> toMap(final Function keySelector, final Function valueSelector) { @@ -16802,6 +16994,7 @@ public final Single> toMap(final FunctionReactiveX operators documentation: To */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single> toMap(final Function keySelector, @@ -16915,6 +17108,7 @@ public final Single>> toMultimap(FunctionReactiveX operators documentation: To */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single>> toMultimap( @@ -17046,6 +17240,7 @@ public final Single> toSortedList() { * @see ReactiveX operators documentation: To */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single> toSortedList(final Comparator comparator) { @@ -17081,6 +17276,7 @@ public final Single> toSortedList(final Comparator comparator * @since 2.0 */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) public final Single> toSortedList(final Comparator comparator, int capacityHint) { @@ -17142,6 +17338,7 @@ public final Single> toSortedList(int capacityHint) { * @see ReactiveX operators documentation: SubscribeOn */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable unsubscribeOn(Scheduler scheduler) { @@ -17352,6 +17549,7 @@ public final Flowable> window(long timespan, long timeskip, TimeUnit * @see ReactiveX operators documentation: Window */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable> window(long timespan, long timeskip, TimeUnit unit, Scheduler scheduler, int bufferSize) { @@ -17630,6 +17828,7 @@ public final Flowable> window(long timespan, TimeUnit unit, * @see ReactiveX operators documentation: Window */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.CUSTOM) public final Flowable> window( @@ -17698,6 +17897,7 @@ public final Flowable> window(Publisher boundaryIndicator) { * @see ReactiveX operators documentation: Window */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable> window(Publisher boundaryIndicator, int bufferSize) { @@ -17774,6 +17974,7 @@ public final Flowable> window( * @see ReactiveX operators documentation: Window */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable> window( @@ -17847,6 +18048,7 @@ public final Flowable> window(Callable> b * @see ReactiveX operators documentation: Window */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable> window(Callable> boundaryIndicatorSupplier, int bufferSize) { @@ -17884,6 +18086,7 @@ public final Flowable> window(Callable> b * @see ReactiveX operators documentation: CombineLatest */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable withLatestFrom(Publisher other, @@ -17921,6 +18124,7 @@ public final Flowable withLatestFrom(Publisher other, * @since 2.0 */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable withLatestFrom(Publisher source1, Publisher source2, @@ -17960,6 +18164,7 @@ public final Flowable withLatestFrom(Publisher source1, Publi * @since 2.0 */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable withLatestFrom( @@ -18004,6 +18209,7 @@ public final Flowable withLatestFrom( * @since 2.0 */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable withLatestFrom( @@ -18042,6 +18248,7 @@ public final Flowable withLatestFrom( * @since 2.0 */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable withLatestFrom(Publisher[] others, Function combiner) { @@ -18074,6 +18281,7 @@ public final Flowable withLatestFrom(Publisher[] others, Function Flowable withLatestFrom(Iterable> others, Function combiner) { @@ -18113,6 +18321,7 @@ public final Flowable withLatestFrom(Iterable> oth * @see ReactiveX operators documentation: Zip */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable zipWith(Iterable other, BiFunction zipper) { @@ -18161,6 +18370,7 @@ public final Flowable zipWith(Iterable other, BiFunctionReactiveX operators documentation: Zip */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable zipWith(Publisher other, BiFunction zipper) { diff --git a/src/main/java/io/reactivex/Maybe.java b/src/main/java/io/reactivex/Maybe.java index b1d34260f1..773021a028 100644 --- a/src/main/java/io/reactivex/Maybe.java +++ b/src/main/java/io/reactivex/Maybe.java @@ -124,6 +124,7 @@ public abstract class Maybe implements MaybeSource { * @return the new Maybe instance */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Maybe amb(final Iterable> sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -174,6 +175,7 @@ public static Maybe ambArray(final MaybeSource... sources) { */ @BackpressureSupport(BackpressureKind.FULL) @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Flowable concat(Iterable> sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -201,6 +203,7 @@ public static Flowable concat(Iterable */ @BackpressureSupport(BackpressureKind.FULL) @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Flowable concat(MaybeSource source1, MaybeSource source2) { @@ -232,6 +235,7 @@ public static Flowable concat(MaybeSource source1, MaybeSour */ @BackpressureSupport(BackpressureKind.FULL) @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Flowable concat( @@ -267,6 +271,7 @@ public static Flowable concat( */ @BackpressureSupport(BackpressureKind.FULL) @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Flowable concat( @@ -322,6 +327,7 @@ public static Flowable concat(Publisher Flowable concat(Publisher> sources, int prefetch) { @@ -346,6 +352,7 @@ public static Flowable concat(Publisher Flowable concatArray(MaybeSource... sources) { @@ -434,6 +441,7 @@ public static Flowable concatArrayEager(MaybeSource... sourc @SuppressWarnings({ "unchecked", "rawtypes" }) @BackpressureSupport(BackpressureKind.FULL) @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Flowable concatDelayError(Iterable> sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -557,6 +565,7 @@ public static Flowable concatEager(Publisher Maybe create(MaybeOnSubscribe onSubscribe) { ObjectHelper.requireNonNull(onSubscribe, "onSubscribe is null"); @@ -576,6 +585,7 @@ public static Maybe create(MaybeOnSubscribe onSubscribe) { * @return the new Maybe instance */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Maybe defer(final Callable> maybeSupplier) { ObjectHelper.requireNonNull(maybeSupplier, "maybeSupplier is null"); @@ -620,6 +630,7 @@ public static Maybe empty() { * @see ReactiveX operators documentation: Throw */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Maybe error(Throwable exception) { ObjectHelper.requireNonNull(exception, "exception is null"); @@ -645,6 +656,7 @@ public static Maybe error(Throwable exception) { * @see ReactiveX operators documentation: Throw */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Maybe error(Callable supplier) { ObjectHelper.requireNonNull(supplier, "errorSupplier is null"); @@ -671,6 +683,7 @@ public static Maybe error(Callable supplier) { * @throws NullPointerException if run is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Maybe fromAction(final Action run) { ObjectHelper.requireNonNull(run, "run is null"); @@ -690,6 +703,7 @@ public static Maybe fromAction(final Action run) { * @throws NullPointerException if completable is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Maybe fromCompletable(CompletableSource completableSource) { ObjectHelper.requireNonNull(completableSource, "completableSource is null"); @@ -709,6 +723,7 @@ public static Maybe fromCompletable(CompletableSource completableSource) * @throws NullPointerException if single is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Maybe fromSingle(SingleSource singleSource) { ObjectHelper.requireNonNull(singleSource, "singleSource is null"); @@ -750,6 +765,7 @@ public static Maybe fromSingle(SingleSource singleSource) { * @return a new Maybe instance */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Maybe fromCallable(@NonNull final Callable callable) { ObjectHelper.requireNonNull(callable, "callable is null"); @@ -783,6 +799,7 @@ public static Maybe fromCallable(@NonNull final Callable cal * @see ReactiveX operators documentation: From */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Maybe fromFuture(Future future) { ObjectHelper.requireNonNull(future, "future is null"); @@ -820,6 +837,7 @@ public static Maybe fromFuture(Future future) { * @see ReactiveX operators documentation: From */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Maybe fromFuture(Future future, long timeout, TimeUnit unit) { ObjectHelper.requireNonNull(future, "future is null"); @@ -840,6 +858,7 @@ public static Maybe fromFuture(Future future, long timeout, * @throws NullPointerException if run is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Maybe fromRunnable(final Runnable run) { ObjectHelper.requireNonNull(run, "run is null"); @@ -866,6 +885,7 @@ public static Maybe fromRunnable(final Runnable run) { * @see ReactiveX operators documentation: Just */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Maybe just(T item) { ObjectHelper.requireNonNull(item, "item is null"); @@ -970,6 +990,7 @@ public static Flowable merge(Publisher */ @BackpressureSupport(BackpressureKind.FULL) @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings({ "unchecked", "rawtypes" }) public static Flowable merge(Publisher> sources, int maxConcurrency) { @@ -1002,6 +1023,7 @@ public static Flowable merge(Publisher * @see ReactiveX operators documentation: Merge */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings({ "unchecked", "rawtypes" }) public static Maybe merge(MaybeSource> source) { @@ -1047,6 +1069,7 @@ public static Maybe merge(MaybeSource> */ @BackpressureSupport(BackpressureKind.FULL) @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Flowable merge( @@ -1097,6 +1120,7 @@ public static Flowable merge( */ @BackpressureSupport(BackpressureKind.FULL) @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Flowable merge( @@ -1151,6 +1175,7 @@ public static Flowable merge( */ @BackpressureSupport(BackpressureKind.FULL) @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Flowable merge( @@ -1193,6 +1218,7 @@ public static Flowable merge( */ @BackpressureSupport(BackpressureKind.FULL) @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Flowable mergeArray(MaybeSource... sources) { @@ -1347,6 +1373,7 @@ public static Flowable mergeDelayError(Publisher Flowable mergeDelayError(Publisher> sources, int maxConcurrency) { ObjectHelper.requireNonNull(sources, "source is null"); @@ -1385,6 +1412,7 @@ public static Flowable mergeDelayError(Publisher Flowable mergeDelayError(MaybeSource source1, MaybeSource source2) { ObjectHelper.requireNonNull(source1, "source1 is null"); @@ -1426,6 +1454,7 @@ public static Flowable mergeDelayError(MaybeSource source1, @SuppressWarnings({ "unchecked" }) @BackpressureSupport(BackpressureKind.FULL) @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Flowable mergeDelayError(MaybeSource source1, MaybeSource source2, MaybeSource source3) { @@ -1471,6 +1500,7 @@ public static Flowable mergeDelayError(MaybeSource source1, @SuppressWarnings({ "unchecked" }) @BackpressureSupport(BackpressureKind.FULL) @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Flowable mergeDelayError( MaybeSource source1, MaybeSource source2, @@ -1554,6 +1584,7 @@ public static Single sequenceEqual(MaybeSource source1 * @see ReactiveX operators documentation: SequenceEqual */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Single sequenceEqual(MaybeSource source1, MaybeSource source2, BiPredicate isEqual) { @@ -1604,6 +1635,7 @@ public static Maybe timer(long delay, TimeUnit unit) { * @see ReactiveX operators documentation: Timer */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.CUSTOM) public static Maybe timer(long delay, TimeUnit unit, Scheduler scheduler) { ObjectHelper.requireNonNull(unit, "unit is null"); @@ -1624,6 +1656,7 @@ public static Maybe timer(long delay, TimeUnit unit, Scheduler scheduler) * @return the new Maybe instance */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Maybe unsafeCreate(MaybeSource onSubscribe) { if (onSubscribe instanceof Maybe) { @@ -1690,6 +1723,7 @@ public static Maybe using(Callable resourceSupplier, * @see ReactiveX operators documentation: Using */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Maybe using(Callable resourceSupplier, Function> sourceSupplier, @@ -1712,6 +1746,7 @@ public static Maybe using(Callable resourceSupplier, * @return the Maybe wrapper or the source cast to Maybe (if possible) */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Maybe wrap(MaybeSource source) { if (source instanceof Maybe) { @@ -1749,6 +1784,7 @@ public static Maybe wrap(MaybeSource source) { * @see ReactiveX operators documentation: Zip */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Maybe zip(Iterable> sources, Function zipper) { ObjectHelper.requireNonNull(zipper, "zipper is null"); @@ -1783,6 +1819,7 @@ public static Maybe zip(Iterable> s */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Maybe zip( MaybeSource source1, MaybeSource source2, @@ -1822,6 +1859,7 @@ public static Maybe zip( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Maybe zip( MaybeSource source1, MaybeSource source2, MaybeSource source3, @@ -1865,6 +1903,7 @@ public static Maybe zip( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Maybe zip( MaybeSource source1, MaybeSource source2, MaybeSource source3, @@ -1913,6 +1952,7 @@ public static Maybe zip( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Maybe zip( MaybeSource source1, MaybeSource source2, MaybeSource source3, @@ -1965,6 +2005,7 @@ public static Maybe zip( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Maybe zip( MaybeSource source1, MaybeSource source2, MaybeSource source3, @@ -2021,6 +2062,7 @@ public static Maybe zip( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Maybe zip( MaybeSource source1, MaybeSource source2, MaybeSource source3, @@ -2082,6 +2124,7 @@ public static Maybe zip( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Maybe zip( MaybeSource source1, MaybeSource source2, MaybeSource source3, @@ -2147,6 +2190,7 @@ public static Maybe zip( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Maybe zip( MaybeSource source1, MaybeSource source2, MaybeSource source3, @@ -2194,6 +2238,7 @@ public static Maybe zip( * @see ReactiveX operators documentation: Zip */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Maybe zipArray(Function zipper, MaybeSource... sources) { @@ -2227,6 +2272,7 @@ public static Maybe zipArray(Function z */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe ambWith(MaybeSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -2335,6 +2381,7 @@ public final Maybe cache() { * @return the new Maybe instance */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe cast(final Class clazz) { ObjectHelper.requireNonNull(clazz, "clazz is null"); @@ -2383,6 +2430,7 @@ public final Maybe compose(MaybeTransformer trans * @see ReactiveX operators documentation: FlatMap */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe concatMap(Function> mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -2409,6 +2457,7 @@ public final Maybe concatMap(Function concatWith(MaybeSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -2432,6 +2481,7 @@ public final Flowable concatWith(MaybeSource other) { * @see ReactiveX operators documentation: Contains */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Single contains(final Object item) { ObjectHelper.requireNonNull(item, "item is null"); @@ -2480,6 +2530,7 @@ public final Single count() { * @see ReactiveX operators documentation: DefaultIfEmpty */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe defaultIfEmpty(T defaultItem) { ObjectHelper.requireNonNull(defaultItem, "item is null"); @@ -2529,6 +2580,7 @@ public final Maybe delay(long delay, TimeUnit unit) { * @see ReactiveX operators documentation: Delay */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.CUSTOM) public final Maybe delay(long delay, TimeUnit unit, Scheduler scheduler) { ObjectHelper.requireNonNull(unit, "unit is null"); @@ -2559,6 +2611,7 @@ public final Maybe delay(long delay, TimeUnit unit, Scheduler scheduler) { * @see ReactiveX operators documentation: Delay */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) public final Maybe delay(Publisher delayIndicator) { @@ -2584,6 +2637,7 @@ public final Maybe delay(Publisher delayIndicator) { */ @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe delaySubscription(Publisher subscriptionIndicator) { ObjectHelper.requireNonNull(subscriptionIndicator, "subscriptionIndicator is null"); @@ -2652,6 +2706,7 @@ public final Maybe delaySubscription(long delay, TimeUnit unit, Scheduler sch * @since 2.1 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe doAfterSuccess(Consumer onAfterSuccess) { ObjectHelper.requireNonNull(onAfterSuccess, "doAfterSuccess is null"); @@ -2676,6 +2731,7 @@ public final Maybe doAfterSuccess(Consumer onAfterSuccess) { * @see ReactiveX operators documentation: Do */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe doAfterTerminate(Action onAfterTerminate) { return RxJavaPlugins.onAssembly(new MaybePeek(this, @@ -2705,6 +2761,7 @@ public final Maybe doAfterTerminate(Action onAfterTerminate) { * @since 2.1 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe doFinally(Action onFinally) { ObjectHelper.requireNonNull(onFinally, "onFinally is null"); @@ -2723,6 +2780,7 @@ public final Maybe doFinally(Action onFinally) { * @return the new Maybe instance */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe doOnDispose(Action onDispose) { return RxJavaPlugins.onAssembly(new MaybePeek(this, @@ -2750,6 +2808,7 @@ public final Maybe doOnDispose(Action onDispose) { * @see ReactiveX operators documentation: Do */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe doOnComplete(Action onComplete) { return RxJavaPlugins.onAssembly(new MaybePeek(this, @@ -2775,6 +2834,7 @@ public final Maybe doOnComplete(Action onComplete) { * @return the new Maybe instance */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe doOnError(Consumer onError) { return RxJavaPlugins.onAssembly(new MaybePeek(this, @@ -2819,6 +2879,7 @@ public final Maybe doOnEvent(BiConsumer onEvent * @return the new Maybe instance */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe doOnSubscribe(Consumer onSubscribe) { return RxJavaPlugins.onAssembly(new MaybePeek(this, @@ -2844,6 +2905,7 @@ public final Maybe doOnSubscribe(Consumer onSubscribe) { * @return the new Maybe instance */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe doOnSuccess(Consumer onSuccess) { return RxJavaPlugins.onAssembly(new MaybePeek(this, @@ -2874,6 +2936,7 @@ public final Maybe doOnSuccess(Consumer onSuccess) { * @see ReactiveX operators documentation: Filter */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe filter(Predicate predicate) { ObjectHelper.requireNonNull(predicate, "predicate is null"); @@ -2898,6 +2961,7 @@ public final Maybe filter(Predicate predicate) { * @see ReactiveX operators documentation: FlatMap */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe flatMap(Function> mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -2926,6 +2990,7 @@ public final Maybe flatMap(FunctionReactiveX operators documentation: FlatMap */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe flatMap( Function> onSuccessMapper, @@ -2960,6 +3025,7 @@ public final Maybe flatMap( * @see ReactiveX operators documentation: FlatMap */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe flatMap(Function> mapper, BiFunction resultSelector) { @@ -2990,6 +3056,7 @@ public final Maybe flatMap(Function Flowable flattenAsFlowable(final Function> mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -3014,6 +3081,7 @@ public final Flowable flattenAsFlowable(final FunctionReactiveX operators documentation: FlatMap */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Observable flattenAsObservable(final Function> mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -3037,6 +3105,7 @@ public final Observable flattenAsObservable(final FunctionReactiveX operators documentation: FlatMap */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Observable flatMapObservable(Function> mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -3064,6 +3133,7 @@ public final Observable flatMapObservable(Function Flowable flatMapPublisher(Function> mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -3089,6 +3159,7 @@ public final Flowable flatMapPublisher(FunctionReactiveX operators documentation: FlatMap */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Single flatMapSingle(final Function> mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -3116,6 +3187,7 @@ public final Single flatMapSingle(final Function Maybe flatMapSingleElement(final Function> mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -3139,6 +3211,7 @@ public final Maybe flatMapSingleElement(final FunctionReactiveX operators documentation: FlatMap */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Completable flatMapCompletable(final Function mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -3348,6 +3421,7 @@ public final Single isEmpty() { * @see #compose(MaybeTransformer) */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe lift(final MaybeOperator lift) { ObjectHelper.requireNonNull(lift, "onLift is null"); @@ -3371,6 +3445,7 @@ public final Maybe lift(final MaybeOperator lift) * @see ReactiveX operators documentation: Map */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe map(Function mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -3418,6 +3493,7 @@ public final Single> materialize() { */ @BackpressureSupport(BackpressureKind.FULL) @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Flowable mergeWith(MaybeSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -3443,6 +3519,7 @@ public final Flowable mergeWith(MaybeSource other) { * @see #subscribeOn */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.CUSTOM) public final Maybe observeOn(final Scheduler scheduler) { ObjectHelper.requireNonNull(scheduler, "scheduler is null"); @@ -3466,6 +3543,7 @@ public final Maybe observeOn(final Scheduler scheduler) { * @see ReactiveX operators documentation: Filter */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe ofType(final Class clazz) { ObjectHelper.requireNonNull(clazz, "clazz is null"); @@ -3486,6 +3564,7 @@ public final Maybe ofType(final Class clazz) { * @return the value returned by the convert function */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final R to(Function, R> convert) { try { @@ -3549,6 +3628,7 @@ public final Observable toObservable() { * @return the new Single instance */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Single toSingle(T defaultValue) { ObjectHelper.requireNonNull(defaultValue, "defaultValue is null"); @@ -3597,6 +3677,7 @@ public final Maybe onErrorComplete() { * @return the new Completable instance */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe onErrorComplete(final Predicate predicate) { ObjectHelper.requireNonNull(predicate, "predicate is null"); @@ -3624,6 +3705,7 @@ public final Maybe onErrorComplete(final Predicate predica * @see ReactiveX operators documentation: Catch */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe onErrorResumeNext(final MaybeSource next) { ObjectHelper.requireNonNull(next, "next is null"); @@ -3650,6 +3732,7 @@ public final Maybe onErrorResumeNext(final MaybeSource next) { * @see ReactiveX operators documentation: Catch */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe onErrorResumeNext(Function> resumeFunction) { ObjectHelper.requireNonNull(resumeFunction, "resumeFunction is null"); @@ -3676,6 +3759,7 @@ public final Maybe onErrorResumeNext(FunctionReactiveX operators documentation: Catch */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe onErrorReturn(Function valueSupplier) { ObjectHelper.requireNonNull(valueSupplier, "valueSupplier is null"); @@ -3701,6 +3785,7 @@ public final Maybe onErrorReturn(Function val * @see ReactiveX operators documentation: Catch */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe onErrorReturnItem(final T item) { ObjectHelper.requireNonNull(item, "item is null"); @@ -3730,6 +3815,7 @@ public final Maybe onErrorReturnItem(final T item) { * @see ReactiveX operators documentation: Catch */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe onExceptionResumeNext(final MaybeSource next) { ObjectHelper.requireNonNull(next, "next is null"); @@ -3970,6 +4056,7 @@ public final Maybe retry(Predicate predicate) { * @return the new Maybe instance */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe retryUntil(final BooleanSupplier stop) { ObjectHelper.requireNonNull(stop, "stop is null"); @@ -4152,6 +4239,7 @@ public final Disposable subscribe(Consumer onSuccess, ConsumerReactiveX operators documentation: Subscribe */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Disposable subscribe(Consumer onSuccess, Consumer onError, Action onComplete) { @@ -4208,6 +4296,7 @@ public final void subscribe(MaybeObserver observer) { * @see #observeOn */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.CUSTOM) public final Maybe subscribeOn(Scheduler scheduler) { ObjectHelper.requireNonNull(scheduler, "scheduler is null"); @@ -4260,6 +4349,7 @@ public final > E subscribeWith(E observer) { * alternate MaybeSource if the source Maybe is empty. */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe switchIfEmpty(MaybeSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -4283,6 +4373,7 @@ public final Maybe switchIfEmpty(MaybeSource other) { * @since 2.2 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Single switchIfEmpty(SingleSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -4308,6 +4399,7 @@ public final Single switchIfEmpty(SingleSource other) { * @see ReactiveX operators documentation: TakeUntil */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe takeUntil(MaybeSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -4337,6 +4429,7 @@ public final Maybe takeUntil(MaybeSource other) { */ @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe takeUntil(Publisher other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -4388,6 +4481,7 @@ public final Maybe timeout(long timeout, TimeUnit timeUnit) { * @see ReactiveX operators documentation: Timeout */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Maybe timeout(long timeout, TimeUnit timeUnit, MaybeSource fallback) { ObjectHelper.requireNonNull(fallback, "other is null"); @@ -4417,6 +4511,7 @@ public final Maybe timeout(long timeout, TimeUnit timeUnit, MaybeSourceReactiveX operators documentation: Timeout */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.CUSTOM) public final Maybe timeout(long timeout, TimeUnit timeUnit, Scheduler scheduler, MaybeSource fallback) { ObjectHelper.requireNonNull(fallback, "fallback is null"); @@ -4463,6 +4558,7 @@ public final Maybe timeout(long timeout, TimeUnit timeUnit, Scheduler schedul * @return the new Maybe instance */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe timeout(MaybeSource timeoutIndicator) { ObjectHelper.requireNonNull(timeoutIndicator, "timeoutIndicator is null"); @@ -4484,6 +4580,7 @@ public final Maybe timeout(MaybeSource timeoutIndicator) { * @return the new Maybe instance */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe timeout(MaybeSource timeoutIndicator, MaybeSource fallback) { ObjectHelper.requireNonNull(timeoutIndicator, "timeoutIndicator is null"); @@ -4508,6 +4605,7 @@ public final Maybe timeout(MaybeSource timeoutIndicator, MaybeSource Maybe timeout(Publisher timeoutIndicator) { ObjectHelper.requireNonNull(timeoutIndicator, "timeoutIndicator is null"); @@ -4533,6 +4631,7 @@ public final Maybe timeout(Publisher timeoutIndicator) { */ @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe timeout(Publisher timeoutIndicator, MaybeSource fallback) { ObjectHelper.requireNonNull(timeoutIndicator, "timeoutIndicator is null"); @@ -4552,6 +4651,7 @@ public final Maybe timeout(Publisher timeoutIndicator, MaybeSource unsubscribeOn(final Scheduler scheduler) { ObjectHelper.requireNonNull(scheduler, "scheduler is null"); @@ -4585,6 +4685,7 @@ public final Maybe unsubscribeOn(final Scheduler scheduler) { * @see ReactiveX operators documentation: Zip */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe zipWith(MaybeSource other, BiFunction zipper) { ObjectHelper.requireNonNull(other, "other is null"); diff --git a/src/main/java/io/reactivex/Observable.java b/src/main/java/io/reactivex/Observable.java index 541c20b1f4..fdd8b29a92 100644 --- a/src/main/java/io/reactivex/Observable.java +++ b/src/main/java/io/reactivex/Observable.java @@ -116,6 +116,7 @@ public abstract class Observable implements ObservableSource { * @see ReactiveX operators documentation: Amb */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable amb(Iterable> sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -142,6 +143,7 @@ public static Observable amb(Iterable Observable ambArray(ObservableSource... sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -289,6 +291,7 @@ public static Observable combineLatest(IterableReactiveX operators documentation: CombineLatest */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable combineLatest(Iterable> sources, Function combiner, int bufferSize) { @@ -381,6 +384,7 @@ public static Observable combineLatest(ObservableSource[] * @see ReactiveX operators documentation: CombineLatest */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable combineLatest(ObservableSource[] sources, Function combiner, int bufferSize) { @@ -426,6 +430,7 @@ public static Observable combineLatest(ObservableSource[] */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable combineLatest( ObservableSource source1, ObservableSource source2, @@ -468,6 +473,7 @@ public static Observable combineLatest( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable combineLatest( ObservableSource source1, ObservableSource source2, @@ -515,6 +521,7 @@ public static Observable combineLatest( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable combineLatest( ObservableSource source1, ObservableSource source2, @@ -566,6 +573,7 @@ public static Observable combineLatest( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable combineLatest( ObservableSource source1, ObservableSource source2, @@ -622,6 +630,7 @@ public static Observable combineLatest( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable combineLatest( ObservableSource source1, ObservableSource source2, @@ -682,6 +691,7 @@ public static Observable combineLatest( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable combineLatest( ObservableSource source1, ObservableSource source2, @@ -747,6 +757,7 @@ public static Observable combineLatest( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable combineLatest( ObservableSource source1, ObservableSource source2, @@ -816,6 +827,7 @@ public static Observable combineLatest( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable combineLatest( ObservableSource source1, ObservableSource source2, @@ -962,6 +974,7 @@ public static Observable combineLatestDelayError(FunctionReactiveX operators documentation: CombineLatest */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable combineLatestDelayError(ObservableSource[] sources, Function combiner, int bufferSize) { @@ -1057,6 +1070,7 @@ public static Observable combineLatestDelayError(IterableReactiveX operators documentation: CombineLatest */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable combineLatestDelayError(Iterable> sources, Function combiner, int bufferSize) { @@ -1084,6 +1098,7 @@ public static Observable combineLatestDelayError(Iterable Observable concat(Iterable> sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -1134,6 +1149,7 @@ public static Observable concat(ObservableSource Observable concat(ObservableSource> sources, int prefetch) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -1162,6 +1178,7 @@ public static Observable concat(ObservableSource Observable concat(ObservableSource source1, ObservableSource source2) { ObjectHelper.requireNonNull(source1, "source1 is null"); @@ -1192,6 +1209,7 @@ public static Observable concat(ObservableSource source1, Ob */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable concat( ObservableSource source1, ObservableSource source2, @@ -1227,6 +1245,7 @@ public static Observable concat( */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable concat( ObservableSource source1, ObservableSource source2, @@ -1410,6 +1429,7 @@ public static Observable concatArrayEagerDelayError(int maxConcurrency, i * @return the new ObservableSource with the concatenating behavior */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable concatDelayError(Iterable> sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -1455,6 +1475,7 @@ public static Observable concatDelayError(ObservableSource Observable concatDelayError(ObservableSource> sources, int prefetch, boolean tillTheEnd) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -1607,6 +1628,7 @@ public static Observable concatEager(Iterable Observable create(ObservableOnSubscribe source) { ObjectHelper.requireNonNull(source, "source is null"); @@ -1638,6 +1660,7 @@ public static Observable create(ObservableOnSubscribe source) { * @see ReactiveX operators documentation: Defer */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable defer(Callable> supplier) { ObjectHelper.requireNonNull(supplier, "supplier is null"); @@ -1686,6 +1709,7 @@ public static Observable empty() { * @see ReactiveX operators documentation: Throw */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable error(Callable errorSupplier) { ObjectHelper.requireNonNull(errorSupplier, "errorSupplier is null"); @@ -1711,6 +1735,7 @@ public static Observable error(Callable errorSupplie * @see ReactiveX operators documentation: Throw */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable error(final Throwable exception) { ObjectHelper.requireNonNull(exception, "e is null"); @@ -1735,6 +1760,7 @@ public static Observable error(final Throwable exception) { */ @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) + @NonNull public static Observable fromArray(T... items) { ObjectHelper.requireNonNull(items, "items is null"); if (items.length == 0) { @@ -1775,6 +1801,7 @@ public static Observable fromArray(T... items) { * @since 2.0 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable fromCallable(Callable supplier) { ObjectHelper.requireNonNull(supplier, "supplier is null"); @@ -1808,6 +1835,7 @@ public static Observable fromCallable(Callable supplier) { * @see ReactiveX operators documentation: From */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable fromFuture(Future future) { ObjectHelper.requireNonNull(future, "future is null"); @@ -1845,6 +1873,7 @@ public static Observable fromFuture(Future future) { * @see ReactiveX operators documentation: From */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable fromFuture(Future future, long timeout, TimeUnit unit) { ObjectHelper.requireNonNull(future, "future is null"); @@ -1886,6 +1915,7 @@ public static Observable fromFuture(Future future, long time * @see ReactiveX operators documentation: From */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.CUSTOM) public static Observable fromFuture(Future future, long timeout, TimeUnit unit, Scheduler scheduler) { ObjectHelper.requireNonNull(scheduler, "scheduler is null"); @@ -1921,6 +1951,7 @@ public static Observable fromFuture(Future future, long time * @see ReactiveX operators documentation: From */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.CUSTOM) public static Observable fromFuture(Future future, Scheduler scheduler) { ObjectHelper.requireNonNull(scheduler, "scheduler is null"); @@ -1946,6 +1977,7 @@ public static Observable fromFuture(Future future, Scheduler * @see ReactiveX operators documentation: From */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable fromIterable(Iterable source) { ObjectHelper.requireNonNull(source, "source is null"); @@ -1982,6 +2014,7 @@ public static Observable fromIterable(Iterable source) { */ @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable fromPublisher(Publisher publisher) { ObjectHelper.requireNonNull(publisher, "publisher is null"); @@ -2010,6 +2043,7 @@ public static Observable fromPublisher(Publisher publisher) * @return the new Observable instance */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable generate(final Consumer> generator) { ObjectHelper.requireNonNull(generator, "generator is null"); @@ -2041,6 +2075,7 @@ public static Observable generate(final Consumer> generator) { * @return the new Observable instance */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable generate(Callable initialState, final BiConsumer> generator) { ObjectHelper.requireNonNull(generator, "generator is null"); @@ -2073,6 +2108,7 @@ public static Observable generate(Callable initialState, final BiCo * @return the new Observable instance */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable generate( final Callable initialState, @@ -2139,6 +2175,7 @@ public static Observable generate(Callable initialState, BiFunction * @return the new Observable instance */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable generate(Callable initialState, BiFunction, S> generator, Consumer disposeState) { @@ -2199,6 +2236,7 @@ public static Observable interval(long initialDelay, long period, TimeUnit * @since 1.0.12 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.CUSTOM) public static Observable interval(long initialDelay, long period, TimeUnit unit, Scheduler scheduler) { ObjectHelper.requireNonNull(unit, "unit is null"); @@ -2295,6 +2333,7 @@ public static Observable intervalRange(long start, long count, long initia * @return the new Observable instance */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.CUSTOM) public static Observable intervalRange(long start, long count, long initialDelay, long period, TimeUnit unit, Scheduler scheduler) { if (count < 0) { @@ -2344,6 +2383,7 @@ public static Observable intervalRange(long start, long count, long initia * @see #fromIterable(Iterable) */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable just(T item) { ObjectHelper.requireNonNull(item, "The item is null"); @@ -2370,6 +2410,7 @@ public static Observable just(T item) { */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable just(T item1, T item2) { ObjectHelper.requireNonNull(item1, "The first item is null"); @@ -2400,6 +2441,7 @@ public static Observable just(T item1, T item2) { */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable just(T item1, T item2, T item3) { ObjectHelper.requireNonNull(item1, "The first item is null"); @@ -2433,6 +2475,7 @@ public static Observable just(T item1, T item2, T item3) { */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable just(T item1, T item2, T item3, T item4) { ObjectHelper.requireNonNull(item1, "The first item is null"); @@ -2469,6 +2512,7 @@ public static Observable just(T item1, T item2, T item3, T item4) { */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable just(T item1, T item2, T item3, T item4, T item5) { ObjectHelper.requireNonNull(item1, "The first item is null"); @@ -2508,6 +2552,7 @@ public static Observable just(T item1, T item2, T item3, T item4, T item5 */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable just(T item1, T item2, T item3, T item4, T item5, T item6) { ObjectHelper.requireNonNull(item1, "The first item is null"); @@ -2550,6 +2595,7 @@ public static Observable just(T item1, T item2, T item3, T item4, T item5 */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable just(T item1, T item2, T item3, T item4, T item5, T item6, T item7) { ObjectHelper.requireNonNull(item1, "The first item is null"); @@ -2595,6 +2641,7 @@ public static Observable just(T item1, T item2, T item3, T item4, T item5 */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable just(T item1, T item2, T item3, T item4, T item5, T item6, T item7, T item8) { ObjectHelper.requireNonNull(item1, "The first item is null"); @@ -2643,6 +2690,7 @@ public static Observable just(T item1, T item2, T item3, T item4, T item5 */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable just(T item1, T item2, T item3, T item4, T item5, T item6, T item7, T item8, T item9) { ObjectHelper.requireNonNull(item1, "The first item is null"); @@ -2694,6 +2742,7 @@ public static Observable just(T item1, T item2, T item3, T item4, T item5 */ @SuppressWarnings("unchecked") @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Observable just(T item1, T item2, T item3, T item4, T item5, T item6, T item7, T item8, T item9, T item10) { ObjectHelper.requireNonNull(item1, "The first item is null"); diff --git a/src/main/java/io/reactivex/Single.java b/src/main/java/io/reactivex/Single.java index 168c9c216a..f41d69a80c 100644 --- a/src/main/java/io/reactivex/Single.java +++ b/src/main/java/io/reactivex/Single.java @@ -129,6 +129,7 @@ public abstract class Single implements SingleSource { * @since 2.0 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Single amb(final Iterable> sources) { ObjectHelper.requireNonNull(sources, "sources is null"); @@ -180,6 +181,7 @@ public static Single ambArray(final SingleSource... sources) * @since 2.0 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) @BackpressureSupport(BackpressureKind.FULL) public static Flowable concat(Iterable> sources) { @@ -201,6 +203,7 @@ public static Flowable concat(Iterable Observable concat(ObservableSource> sources) { @@ -226,6 +229,7 @@ public static Observable concat(ObservableSource Flowable concat(Publisher> sources) { @@ -251,6 +255,7 @@ public static Flowable concat(Publisher Flowable concat(PublisherReactiveX operators documentation: Concat */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") @@ -313,6 +319,7 @@ public static Flowable concat( * @see ReactiveX operators documentation: Concat */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") @@ -350,6 +357,7 @@ public static Flowable concat( * @see ReactiveX operators documentation: Concat */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") @@ -381,6 +389,7 @@ public static Flowable concat( * @since 2.0 */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings({ "unchecked", "rawtypes" }) @@ -406,6 +415,7 @@ public static Flowable concatArray(SingleSource... sources) */ @BackpressureSupport(BackpressureKind.FULL) @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Flowable concatArrayEager(SingleSource... sources) { return Flowable.fromArray(sources).concatMapEager(SingleInternalHelper.toFlowable()); @@ -433,6 +443,7 @@ public static Flowable concatArrayEager(SingleSource... sour */ @BackpressureSupport(BackpressureKind.FULL) @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Flowable concatEager(Publisher> sources) { return Flowable.fromPublisher(sources).concatMapEager(SingleInternalHelper.toFlowable()); @@ -458,6 +469,7 @@ public static Flowable concatEager(Publisher Flowable concatEager(Iterable> sources) { return Flowable.fromIterable(sources).concatMapEager(SingleInternalHelper.toFlowable()); @@ -500,6 +512,7 @@ public static Flowable concatEager(Iterable Single create(SingleOnSubscribe source) { ObjectHelper.requireNonNull(source, "source is null"); @@ -521,6 +534,7 @@ public static Single create(SingleOnSubscribe source) { * @return the new Single instance */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Single defer(final Callable> singleSupplier) { ObjectHelper.requireNonNull(singleSupplier, "singleSupplier is null"); @@ -541,6 +555,7 @@ public static Single defer(final Callable Single error(final Callable errorSupplier) { ObjectHelper.requireNonNull(errorSupplier, "errorSupplier is null"); @@ -566,6 +581,7 @@ public static Single error(final Callable errorSuppl * @see ReactiveX operators documentation: Throw */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Single error(final Throwable exception) { ObjectHelper.requireNonNull(exception, "error is null"); @@ -599,6 +615,7 @@ public static Single error(final Throwable exception) { * @return a {@link Single} whose {@link SingleObserver}s' subscriptions trigger an invocation of the given function. */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Single fromCallable(final Callable callable) { ObjectHelper.requireNonNull(callable, "callable is null"); @@ -763,6 +780,7 @@ public static Single fromFuture(Future future, Scheduler sch */ @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Single fromPublisher(final Publisher publisher) { ObjectHelper.requireNonNull(publisher, "publisher is null"); @@ -786,6 +804,7 @@ public static Single fromPublisher(final Publisher publisher * @return the new Single instance */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Single fromObservable(ObservableSource observableSource) { ObjectHelper.requireNonNull(observableSource, "observableSource is null"); @@ -813,6 +832,7 @@ public static Single fromObservable(ObservableSource observa */ @CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) + @NonNull public static Single just(final T item) { ObjectHelper.requireNonNull(item, "value is null"); return RxJavaPlugins.onAssembly(new SingleJust(item)); @@ -849,6 +869,7 @@ public static Single just(final T item) { * @see #mergeDelayError(Iterable) */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable merge(Iterable> sources) { @@ -886,6 +907,7 @@ public static Flowable merge(Iterable * @since 2.0 */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings({ "unchecked", "rawtypes" }) @@ -917,6 +939,7 @@ public static Flowable merge(PublisherReactiveX operators documentation: Merge */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings({ "unchecked", "rawtypes" }) public static Single merge(SingleSource> source) { @@ -961,6 +984,7 @@ public static Single merge(SingleSource Flowable merge( * @see #mergeDelayError(SingleSource, SingleSource, SingleSource) */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") @@ -1065,6 +1090,7 @@ public static Flowable merge( * @see #mergeDelayError(SingleSource, SingleSource, SingleSource, SingleSource) */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") @@ -1096,6 +1122,7 @@ public static Flowable merge( * @since 2.2 */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public static Flowable mergeDelayError(Iterable> sources) { @@ -1119,6 +1146,7 @@ public static Flowable mergeDelayError(Iterable Flowable mergeDelayError(Publisher Flowable mergeDelayError( * @since 2.2 */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") @@ -1235,6 +1265,7 @@ public static Flowable mergeDelayError( * @since 2.2 */ @CheckReturnValue + @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") @@ -1305,6 +1336,7 @@ public static Single timer(long delay, TimeUnit unit) { * @since 2.0 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.CUSTOM) public static Single timer(final long delay, final TimeUnit unit, final Scheduler scheduler) { ObjectHelper.requireNonNull(unit, "unit is null"); @@ -1327,6 +1359,7 @@ public static Single timer(final long delay, final TimeUnit unit, final Sc * @since 2.0 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Single equals(final SingleSource first, final SingleSource second) { // NOPMD ObjectHelper.requireNonNull(first, "first is null"); @@ -1350,6 +1383,7 @@ public static Single equals(final SingleSource first, * @since 2.0 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Single unsafeCreate(SingleSource onSubscribe) { ObjectHelper.requireNonNull(onSubscribe, "onSubscribe is null"); @@ -1409,6 +1443,7 @@ public static Single using(Callable resourceSupplier, * @since 2.0 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Single using( final Callable resourceSupplier, @@ -1434,6 +1469,7 @@ public static Single using( * @return the Single wrapper or the source cast to Single (if possible) */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Single wrap(SingleSource source) { ObjectHelper.requireNonNull(source, "source is null"); @@ -1473,6 +1509,7 @@ public static Single wrap(SingleSource source) { * @since 2.0 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Single zip(final Iterable> sources, Function zipper) { ObjectHelper.requireNonNull(zipper, "zipper is null"); @@ -1504,6 +1541,7 @@ public static Single zip(final IterableReactiveX operators documentation: Zip */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Single zip( @@ -1542,6 +1580,7 @@ public static Single zip( * @see ReactiveX operators documentation: Zip */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Single zip( @@ -1585,6 +1624,7 @@ public static Single zip( * @see ReactiveX operators documentation: Zip */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Single zip( @@ -1632,6 +1672,7 @@ public static Single zip( * @see ReactiveX operators documentation: Zip */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Single zip( @@ -1684,6 +1725,7 @@ public static Single zip( * @see ReactiveX operators documentation: Zip */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Single zip( @@ -1740,6 +1782,7 @@ public static Single zip( * @see ReactiveX operators documentation: Zip */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Single zip( @@ -1801,6 +1844,7 @@ public static Single zip( * @see ReactiveX operators documentation: Zip */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Single zip( @@ -1866,6 +1910,7 @@ public static Single zip( * @see ReactiveX operators documentation: Zip */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public static Single zip( @@ -1918,6 +1963,7 @@ public static Single zip( * @since 2.0 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public static Single zipArray(Function zipper, SingleSource... sources) { ObjectHelper.requireNonNull(zipper, "zipper is null"); @@ -1942,6 +1988,7 @@ public static Single zipArray(Function * @since 2.0 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) @SuppressWarnings("unchecked") public final Single ambWith(SingleSource other) { @@ -2048,6 +2095,7 @@ public final Single cache() { * @since 2.0 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Single cast(final Class clazz) { ObjectHelper.requireNonNull(clazz, "clazz is null"); @@ -2166,6 +2214,7 @@ public final Single delay(final long time, final TimeUnit unit, final Schedul * @since 2.2 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.CUSTOM) public final Single delay(final long time, final TimeUnit unit, final Scheduler scheduler, boolean delayError) { ObjectHelper.requireNonNull(unit, "unit is null"); @@ -2188,6 +2237,7 @@ public final Single delay(final long time, final TimeUnit unit, final Schedul * @since 2.0 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Single delaySubscription(CompletableSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -2210,6 +2260,7 @@ public final Single delaySubscription(CompletableSource other) { * @since 2.0 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Single delaySubscription(SingleSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -2232,6 +2283,7 @@ public final Single delaySubscription(SingleSource other) { * @since 2.0 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Single delaySubscription(ObservableSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -2259,6 +2311,7 @@ public final Single delaySubscription(ObservableSource other) { */ @BackpressureSupport(BackpressureKind.FULL) @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Single delaySubscription(Publisher other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -2332,6 +2385,7 @@ public final Single delaySubscription(long time, TimeUnit unit, Scheduler sch * @see #materialize() */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) @Experimental public final Maybe dematerialize(Function> selector) { @@ -2356,6 +2410,7 @@ public final Maybe dematerialize(Function> sel * @since 2.1 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Single doAfterSuccess(Consumer onAfterSuccess) { ObjectHelper.requireNonNull(onAfterSuccess, "doAfterSuccess is null"); @@ -2384,6 +2439,7 @@ public final Single doAfterSuccess(Consumer onAfterSuccess) { * @since 2.1 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Single doAfterTerminate(Action onAfterTerminate) { ObjectHelper.requireNonNull(onAfterTerminate, "onAfterTerminate is null"); @@ -2410,6 +2466,7 @@ public final Single doAfterTerminate(Action onAfterTerminate) { * @since 2.1 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Single doFinally(Action onFinally) { ObjectHelper.requireNonNull(onFinally, "onFinally is null"); @@ -2431,6 +2488,7 @@ public final Single doFinally(Action onFinally) { * @since 2.0 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Single doOnSubscribe(final Consumer onSubscribe) { ObjectHelper.requireNonNull(onSubscribe, "onSubscribe is null"); @@ -2452,6 +2510,7 @@ public final Single doOnSubscribe(final Consumer onSubscr * @since 2.0 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Single doOnSuccess(final Consumer onSuccess) { ObjectHelper.requireNonNull(onSuccess, "onSuccess is null"); @@ -2470,6 +2529,7 @@ public final Single doOnSuccess(final Consumer onSuccess) { * @since 2.0 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Single doOnEvent(final BiConsumer onEvent) { ObjectHelper.requireNonNull(onEvent, "onEvent is null"); @@ -2491,6 +2551,7 @@ public final Single doOnEvent(final BiConsumer * @since 2.0 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Single doOnError(final Consumer onError) { ObjectHelper.requireNonNull(onError, "onError is null"); @@ -2513,6 +2574,7 @@ public final Single doOnError(final Consumer onError) { * @since 2.0 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Single doOnDispose(final Action onDispose) { ObjectHelper.requireNonNull(onDispose, "onDispose is null"); @@ -2537,6 +2599,7 @@ public final Single doOnDispose(final Action onDispose) { * @see ReactiveX operators documentation: Filter */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe filter(Predicate predicate) { ObjectHelper.requireNonNull(predicate, "predicate is null"); @@ -2560,6 +2623,7 @@ public final Maybe filter(Predicate predicate) { * @see ReactiveX operators documentation: FlatMap */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Single flatMap(Function> mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -2583,6 +2647,7 @@ public final Single flatMap(FunctionReactiveX operators documentation: FlatMap */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Maybe flatMapMaybe(final Function> mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -2611,6 +2676,7 @@ public final Maybe flatMapMaybe(final Function Flowable flatMapPublisher(Function> mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -2639,6 +2705,7 @@ public final Flowable flatMapPublisher(Function Flowable flattenAsFlowable(final Function> mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -2663,6 +2730,7 @@ public final Flowable flattenAsFlowable(final FunctionReactiveX operators documentation: FlatMap */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Observable flattenAsObservable(final Function> mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -2686,6 +2754,7 @@ public final Observable flattenAsObservable(final FunctionReactiveX operators documentation: FlatMap */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Observable flatMapObservable(Function> mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -2710,6 +2779,7 @@ public final Observable flatMapObservable(Function mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -2879,6 +2949,7 @@ public final T blockingGet() { * @see #compose(SingleTransformer) */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Single lift(final SingleOperator lift) { ObjectHelper.requireNonNull(lift, "onLift is null"); @@ -2902,6 +2973,7 @@ public final Single lift(final SingleOperator lif * @see ReactiveX operators documentation: Map */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Single map(Function mapper) { ObjectHelper.requireNonNull(mapper, "mapper is null"); @@ -2959,6 +3031,7 @@ public final Single contains(Object value) { * @since 2.0 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Single contains(final Object value, final BiPredicate comparer) { ObjectHelper.requireNonNull(value, "value is null"); @@ -3012,6 +3085,7 @@ public final Flowable mergeWith(SingleSource other) { * @see #subscribeOn */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.CUSTOM) public final Single observeOn(final Scheduler scheduler) { ObjectHelper.requireNonNull(scheduler, "scheduler is null"); @@ -3045,6 +3119,7 @@ public final Single observeOn(final Scheduler scheduler) { * @see ReactiveX operators documentation: Catch */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Single onErrorReturn(final Function resumeFunction) { ObjectHelper.requireNonNull(resumeFunction, "resumeFunction is null"); @@ -3064,6 +3139,7 @@ public final Single onErrorReturn(final Function resu * @since 2.0 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Single onErrorReturnItem(final T value) { ObjectHelper.requireNonNull(value, "value is null"); @@ -3098,6 +3174,7 @@ public final Single onErrorReturnItem(final T value) { * @see ReactiveX operators documentation: Catch */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Single onErrorResumeNext(final Single resumeSingleInCaseOfError) { ObjectHelper.requireNonNull(resumeSingleInCaseOfError, "resumeSingleInCaseOfError is null"); @@ -3133,6 +3210,7 @@ public final Single onErrorResumeNext(final Single resumeSingleI * @since .20 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Single onErrorResumeNext( final Function> resumeFunctionInCaseOfError) { @@ -3419,6 +3497,7 @@ public final Disposable subscribe() { * if {@code onCallback} is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Disposable subscribe(final BiConsumer onCallback) { ObjectHelper.requireNonNull(onCallback, "onCallback is null"); @@ -3472,6 +3551,7 @@ public final Disposable subscribe(Consumer onSuccess) { * if {@code onError} is null */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Disposable subscribe(final Consumer onSuccess, final Consumer onError) { ObjectHelper.requireNonNull(onSuccess, "onSuccess is null"); @@ -3560,6 +3640,7 @@ public final > E subscribeWith(E observer) { * @see #observeOn */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.CUSTOM) public final Single subscribeOn(final Scheduler scheduler) { ObjectHelper.requireNonNull(scheduler, "scheduler is null"); @@ -3584,6 +3665,7 @@ public final Single subscribeOn(final Scheduler scheduler) { * @see ReactiveX operators documentation: TakeUntil */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Single takeUntil(final CompletableSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -3615,6 +3697,7 @@ public final Single takeUntil(final CompletableSource other) { */ @BackpressureSupport(BackpressureKind.FULL) @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Single takeUntil(final Publisher other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -3640,6 +3723,7 @@ public final Single takeUntil(final Publisher other) { * @see ReactiveX operators documentation: TakeUntil */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.NONE) public final Single takeUntil(final SingleSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -3699,6 +3783,7 @@ public final Single timeout(long timeout, TimeUnit unit, Scheduler scheduler) * @since 2.0 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.CUSTOM) public final Single timeout(long timeout, TimeUnit unit, Scheduler scheduler, SingleSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -3724,6 +3809,7 @@ public final Single timeout(long timeout, TimeUnit unit, Scheduler scheduler, * @since 2.0 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Single timeout(long timeout, TimeUnit unit, SingleSource other) { ObjectHelper.requireNonNull(other, "other is null"); @@ -3902,6 +3988,7 @@ public final Observable toObservable() { * @since 2.2 */ @CheckReturnValue + @NonNull @SchedulerSupport(SchedulerSupport.CUSTOM) public final Single unsubscribeOn(final Scheduler scheduler) { ObjectHelper.requireNonNull(scheduler, "scheduler is null");