From d352270d1c2a55eaa2f5641152e167a1e02fb14b Mon Sep 17 00:00:00 2001 From: Sadegh Kazemy Date: Sat, 11 Nov 2017 08:28:27 +0330 Subject: [PATCH 1/2] Add a sentence to documentation of take() operator --- src/main/java/io/reactivex/Flowable.java | 4 ++++ src/main/java/io/reactivex/Observable.java | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/main/java/io/reactivex/Flowable.java b/src/main/java/io/reactivex/Flowable.java index d15f735a44..c7b30f27ba 100644 --- a/src/main/java/io/reactivex/Flowable.java +++ b/src/main/java/io/reactivex/Flowable.java @@ -13391,6 +13391,8 @@ public final Flowable take(long count) { /** * Returns a Flowable that emits those items emitted by source Publisher before a specified time runs * out. + * If time runs out before Flowable is finished, termination events would be balled on provided {@link Scheduler}, + * which is {@code computation} by default. *

* *

@@ -13418,6 +13420,8 @@ public final Flowable take(long time, TimeUnit unit) { /** * Returns a Flowable that emits those items emitted by source Publisher before a specified time (on a * specified Scheduler) runs out. + * If time runs out before Flowable is finished, termination events would be balled on provided {@link Scheduler}, + * which is {@code computation} by default. *

* *

diff --git a/src/main/java/io/reactivex/Observable.java b/src/main/java/io/reactivex/Observable.java index ba82c99c7a..a2dbf39c89 100644 --- a/src/main/java/io/reactivex/Observable.java +++ b/src/main/java/io/reactivex/Observable.java @@ -11285,6 +11285,8 @@ public final Observable take(long count) { /** * Returns an Observable that emits those items emitted by source ObservableSource before a specified time runs * out. + * If time runs out before Observable is finished, termination events would be called on provided {@link Scheduler}, + * which is {@code computation} by default. *

* *

@@ -11308,6 +11310,8 @@ public final Observable take(long time, TimeUnit unit) { /** * Returns an Observable that emits those items emitted by source ObservableSource before a specified time (on a * specified Scheduler) runs out. + * If time runs out before Observable is finished, termination events would be called on provided {@link Scheduler}, + * which is {@code computation} by default. *

* *

From 7299fe3f3056cbf4208c4d50e683b09c345bf577 Mon Sep 17 00:00:00 2001 From: Sadegh Kazemy Date: Sat, 11 Nov 2017 14:54:27 +0330 Subject: [PATCH 2/2] Rephrase java doc for take() method --- src/main/java/io/reactivex/Flowable.java | 10 ++++++---- src/main/java/io/reactivex/Observable.java | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/main/java/io/reactivex/Flowable.java b/src/main/java/io/reactivex/Flowable.java index c7b30f27ba..f4519888d0 100644 --- a/src/main/java/io/reactivex/Flowable.java +++ b/src/main/java/io/reactivex/Flowable.java @@ -13391,8 +13391,9 @@ public final Flowable take(long count) { /** * Returns a Flowable that emits those items emitted by source Publisher before a specified time runs * out. - * If time runs out before Flowable is finished, termination events would be balled on provided {@link Scheduler}, - * which is {@code computation} by default. + *

+ * If time runs out before the {@code Flowable} completes normally, the {@code onComplete} event will be + * signaled on the default {@code computation} {@link Scheduler}. *

* *

@@ -13420,8 +13421,9 @@ public final Flowable take(long time, TimeUnit unit) { /** * Returns a Flowable that emits those items emitted by source Publisher before a specified time (on a * specified Scheduler) runs out. - * If time runs out before Flowable is finished, termination events would be balled on provided {@link Scheduler}, - * which is {@code computation} by default. + *

+ * If time runs out before the {@code Flowable} completes normally, the {@code onComplete} event will be + * signaled on the provided {@link Scheduler}. *

* *

diff --git a/src/main/java/io/reactivex/Observable.java b/src/main/java/io/reactivex/Observable.java index a2dbf39c89..abdcea3b4c 100644 --- a/src/main/java/io/reactivex/Observable.java +++ b/src/main/java/io/reactivex/Observable.java @@ -11285,8 +11285,9 @@ public final Observable take(long count) { /** * Returns an Observable that emits those items emitted by source ObservableSource before a specified time runs * out. - * If time runs out before Observable is finished, termination events would be called on provided {@link Scheduler}, - * which is {@code computation} by default. + *

+ * If time runs out before the {@code Observable} completes normally, the {@code onComplete} event will be + * signaled on the default {@code computation} {@link Scheduler}. *

* *

@@ -11310,8 +11311,9 @@ public final Observable take(long time, TimeUnit unit) { /** * Returns an Observable that emits those items emitted by source ObservableSource before a specified time (on a * specified Scheduler) runs out. - * If time runs out before Observable is finished, termination events would be called on provided {@link Scheduler}, - * which is {@code computation} by default. + *

+ * If time runs out before the {@code Observable} completes normally, the {@code onComplete} event will be + * signaled on the provided {@link Scheduler}. *

* *