From e3b695a5b1e8a94a0948e75a06c2091cc84fe19a Mon Sep 17 00:00:00 2001 From: David Karnok Date: Fri, 21 Jun 2019 11:26:29 +0200 Subject: [PATCH] 3.x: add marbles to X.fromSupplier (#6531) --- src/main/java/io/reactivex/Completable.java | 2 +- src/main/java/io/reactivex/Flowable.java | 2 +- src/main/java/io/reactivex/Maybe.java | 2 ++ src/main/java/io/reactivex/Observable.java | 2 +- src/main/java/io/reactivex/Single.java | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/io/reactivex/Completable.java b/src/main/java/io/reactivex/Completable.java index da9a6d4253..994054253c 100644 --- a/src/main/java/io/reactivex/Completable.java +++ b/src/main/java/io/reactivex/Completable.java @@ -615,7 +615,7 @@ public static Completable fromSingle(final SingleSource single) { * Returns a Completable which when subscribed, executes the supplier function, ignores its * normal result and emits onError or onComplete only. *

- * + * *

*
Scheduler:
*
{@code fromSupplier} does not operate by default on a particular {@link Scheduler}.
diff --git a/src/main/java/io/reactivex/Flowable.java b/src/main/java/io/reactivex/Flowable.java index 26b2e9f4a9..fdc421fc4d 100644 --- a/src/main/java/io/reactivex/Flowable.java +++ b/src/main/java/io/reactivex/Flowable.java @@ -2336,7 +2336,7 @@ public static Flowable fromPublisher(final Publisher source) * Returns a Flowable that, when a Subscriber subscribes to it, invokes a supplier function you specify and then * emits the value returned from that function. *

- * + * *

* This allows you to defer the execution of the function you specify until a Subscriber subscribes to the * Publisher. That is to say, it makes the function "lazy." diff --git a/src/main/java/io/reactivex/Maybe.java b/src/main/java/io/reactivex/Maybe.java index ffc042e178..bf8affc838 100644 --- a/src/main/java/io/reactivex/Maybe.java +++ b/src/main/java/io/reactivex/Maybe.java @@ -877,6 +877,8 @@ public static Maybe fromRunnable(final Runnable run) { * subscribes to the returned {@link Maybe}. In other terms, this source operator evaluates the given * {@code Supplier} "lazily". *

+ * + *

* Note that the {@code null} handling of this operator differs from the similar source operators in the other * {@link io.reactivex base reactive classes}. Those operators signal a {@code NullPointerException} if the value returned by their * {@code Supplier} is {@code null} while this {@code fromSupplier} considers it to indicate the diff --git a/src/main/java/io/reactivex/Observable.java b/src/main/java/io/reactivex/Observable.java index de774168f8..a090a511b8 100644 --- a/src/main/java/io/reactivex/Observable.java +++ b/src/main/java/io/reactivex/Observable.java @@ -2026,7 +2026,7 @@ public static Observable fromPublisher(Publisher publisher) * Returns an Observable that, when an observer subscribes to it, invokes a supplier function you specify and then * emits the value returned from that function. *

- * + * *

* This allows you to defer the execution of the function you specify until an observer subscribes to the * ObservableSource. That is to say, it makes the function "lazy." diff --git a/src/main/java/io/reactivex/Single.java b/src/main/java/io/reactivex/Single.java index da446cfafd..d2932cbc32 100644 --- a/src/main/java/io/reactivex/Single.java +++ b/src/main/java/io/reactivex/Single.java @@ -821,7 +821,7 @@ public static Single fromObservable(ObservableSource observa * It makes passed function "lazy". * Result of the function invocation will be emitted by the {@link Single}. *

- * + * *

*
Scheduler:
*
{@code fromSupplier} does not operate by default on a particular {@link Scheduler}.