Skip to content

Commit 31b407f

Browse files
ddunig2akarnokd
authored andcommitted
backporting #6729 to 2.x branch. (#6746)
1 parent 56d6e91 commit 31b407f

File tree

5 files changed

+18
-14
lines changed

5 files changed

+18
-14
lines changed

src/main/java/io/reactivex/Flowable.java

+7-3
Original file line numberDiff line numberDiff line change
@@ -8266,7 +8266,6 @@ public final Single<Boolean> contains(final Object item) {
82668266
* @return a Single that emits a single item: the number of items emitted by the source Publisher as a
82678267
* 64-bit Long item
82688268
* @see <a href="http://reactivex.io/documentation/operators/count.html">ReactiveX operators documentation: Count</a>
8269-
* @see #count()
82708269
*/
82718270
@CheckReturnValue
82728271
@BackpressureSupport(BackpressureKind.UNBOUNDED_IN)
@@ -15121,6 +15120,7 @@ public final Flowable<T> switchIfEmpty(Publisher<? extends T> other) {
1512115120
* Publisher
1512215121
* @return a Flowable that emits the items emitted by the Publisher returned from applying {@code func} to the most recently emitted item emitted by the source Publisher
1512315122
* @see <a href="http://reactivex.io/documentation/operators/flatmap.html">ReactiveX operators documentation: FlatMap</a>
15123+
* @see #switchMapDelayError(Function)
1512415124
*/
1512515125
@CheckReturnValue
1512615126
@BackpressureSupport(BackpressureKind.FULL)
@@ -15156,6 +15156,7 @@ public final <R> Flowable<R> switchMap(Function<? super T, ? extends Publisher<?
1515615156
* the number of elements to prefetch from the current active inner Publisher
1515715157
* @return a Flowable that emits the items emitted by the Publisher returned from applying {@code func} to the most recently emitted item emitted by the source Publisher
1515815158
* @see <a href="http://reactivex.io/documentation/operators/flatmap.html">ReactiveX operators documentation: FlatMap</a>
15159+
* @see #switchMapDelayError(Function, int)
1515915160
*/
1516015161
@CheckReturnValue
1516115162
@BackpressureSupport(BackpressureKind.FULL)
@@ -15245,7 +15246,7 @@ public final Completable switchMapCompletable(@NonNull Function<? super T, ? ext
1524515246
* {@link CompletableSource} to be subscribed to and awaited for
1524615247
* (non blockingly) for its terminal event
1524715248
* @return the new Completable instance
15248-
* @see #switchMapCompletableDelayError(Function)
15249+
* @see #switchMapCompletable(Function)
1524915250
* @since 2.2
1525015251
*/
1525115252
@CheckReturnValue
@@ -15283,6 +15284,7 @@ public final Completable switchMapCompletableDelayError(@NonNull Function<? supe
1528315284
* Publisher
1528415285
* @return a Flowable that emits the items emitted by the Publisher returned from applying {@code func} to the most recently emitted item emitted by the source Publisher
1528515286
* @see <a href="http://reactivex.io/documentation/operators/flatmap.html">ReactiveX operators documentation: FlatMap</a>
15287+
* @see #switchMap(Function)
1528615288
* @since 2.0
1528715289
*/
1528815290
@CheckReturnValue
@@ -15320,6 +15322,7 @@ public final <R> Flowable<R> switchMapDelayError(Function<? super T, ? extends P
1532015322
* the number of elements to prefetch from the current active inner Publisher
1532115323
* @return a Flowable that emits the items emitted by the Publisher returned from applying {@code func} to the most recently emitted item emitted by the source Publisher
1532215324
* @see <a href="http://reactivex.io/documentation/operators/flatmap.html">ReactiveX operators documentation: FlatMap</a>
15325+
* @see #switchMap(Function, int)
1532315326
* @since 2.0
1532415327
*/
1532515328
@CheckReturnValue
@@ -15373,6 +15376,7 @@ <R> Flowable<R> switchMap0(Function<? super T, ? extends Publisher<? extends R>>
1537315376
* and get subscribed to.
1537415377
* @return the new Flowable instance
1537515378
* @see #switchMapMaybe(Function)
15379+
* @see #switchMapMaybeDelayError(Function)
1537615380
* @since 2.2
1537715381
*/
1537815382
@CheckReturnValue
@@ -15444,7 +15448,7 @@ public final <R> Flowable<R> switchMapMaybeDelayError(@NonNull Function<? super
1544415448
* return a {@code SingleSource} to replace the current active inner source
1544515449
* and get subscribed to.
1544615450
* @return the new Flowable instance
15447-
* @see #switchMapSingle(Function)
15451+
* @see #switchMapSingleDelayError(Function)
1544815452
* @since 2.2
1544915453
*/
1545015454
@CheckReturnValue

src/main/java/io/reactivex/Observable.java

+8-3
Original file line numberDiff line numberDiff line change
@@ -7283,7 +7283,6 @@ public final Single<Boolean> contains(final Object element) {
72837283
* @return a Single that emits a single item: the number of items emitted by the source ObservableSource as a
72847284
* 64-bit Long item
72857285
* @see <a href="http://reactivex.io/documentation/operators/count.html">ReactiveX operators documentation: Count</a>
7286-
* @see #count()
72877286
*/
72887287
@CheckReturnValue
72897288
@SchedulerSupport(SchedulerSupport.NONE)
@@ -12405,6 +12404,7 @@ public final Observable<T> switchIfEmpty(ObservableSource<? extends T> other) {
1240512404
* ObservableSource
1240612405
* @return an Observable that emits the items emitted by the ObservableSource returned from applying {@code func} to the most recently emitted item emitted by the source ObservableSource
1240712406
* @see <a href="http://reactivex.io/documentation/operators/flatmap.html">ReactiveX operators documentation: FlatMap</a>
12407+
* @see #switchMapDelayError(Function)
1240812408
*/
1240912409
@CheckReturnValue
1241012410
@SchedulerSupport(SchedulerSupport.NONE)
@@ -12434,6 +12434,7 @@ public final <R> Observable<R> switchMap(Function<? super T, ? extends Observabl
1243412434
* the number of elements to prefetch from the current active inner ObservableSource
1243512435
* @return an Observable that emits the items emitted by the ObservableSource returned from applying {@code func} to the most recently emitted item emitted by the source ObservableSource
1243612436
* @see <a href="http://reactivex.io/documentation/operators/flatmap.html">ReactiveX operators documentation: FlatMap</a>
12437+
* @see #switchMapDelayError(Function, int)
1243712438
*/
1243812439
@CheckReturnValue
1243912440
@SchedulerSupport(SchedulerSupport.NONE)
@@ -12524,7 +12525,7 @@ public final Completable switchMapCompletable(@NonNull Function<? super T, ? ext
1252412525
* {@link CompletableSource} to be subscribed to and awaited for
1252512526
* (non blockingly) for its terminal event
1252612527
* @return the new Completable instance
12527-
* @see #switchMapCompletableDelayError(Function)
12528+
* @see #switchMapCompletable(Function)
1252812529
* @since 2.2
1252912530
*/
1253012531
@CheckReturnValue
@@ -12560,7 +12561,7 @@ public final Completable switchMapCompletableDelayError(@NonNull Function<? supe
1256012561
* return a {@code MaybeSource} to replace the current active inner source
1256112562
* and get subscribed to.
1256212563
* @return the new Observable instance
12563-
* @see #switchMapMaybe(Function)
12564+
* @see #switchMapMaybeDelayError(Function)
1256412565
* @since 2.2
1256512566
*/
1256612567
@CheckReturnValue
@@ -12616,6 +12617,7 @@ public final <R> Observable<R> switchMapMaybeDelayError(@NonNull Function<? supe
1261612617
* SingleSource
1261712618
* @return an Observable that emits the item emitted by the SingleSource returned from applying {@code func} to the most recently emitted item emitted by the source ObservableSource
1261812619
* @see <a href="http://reactivex.io/documentation/operators/flatmap.html">ReactiveX operators documentation: FlatMap</a>
12620+
* @see #switchMapSingleDelayError(Function)
1261912621
* @since 2.2
1262012622
*/
1262112623
@CheckReturnValue
@@ -12647,6 +12649,7 @@ public final <R> Observable<R> switchMapSingle(@NonNull Function<? super T, ? ex
1264712649
* SingleSource
1264812650
* @return an Observable that emits the item emitted by the SingleSource returned from applying {@code func} to the most recently emitted item emitted by the source ObservableSource
1264912651
* @see <a href="http://reactivex.io/documentation/operators/flatmap.html">ReactiveX operators documentation: FlatMap</a>
12652+
* @see #switchMapSingle(Function)
1265012653
* @since 2.2
1265112654
*/
1265212655
@CheckReturnValue
@@ -12678,6 +12681,7 @@ public final <R> Observable<R> switchMapSingleDelayError(@NonNull Function<? sup
1267812681
* ObservableSource
1267912682
* @return an Observable that emits the items emitted by the ObservableSource returned from applying {@code func} to the most recently emitted item emitted by the source ObservableSource
1268012683
* @see <a href="http://reactivex.io/documentation/operators/flatmap.html">ReactiveX operators documentation: FlatMap</a>
12684+
* @see #switchMap(Function)
1268112685
* @since 2.0
1268212686
*/
1268312687
@CheckReturnValue
@@ -12709,6 +12713,7 @@ public final <R> Observable<R> switchMapDelayError(Function<? super T, ? extends
1270912713
* the number of elements to prefetch from the current active inner ObservableSource
1271012714
* @return an Observable that emits the items emitted by the ObservableSource returned from applying {@code func} to the most recently emitted item emitted by the source ObservableSource
1271112715
* @see <a href="http://reactivex.io/documentation/operators/flatmap.html">ReactiveX operators documentation: FlatMap</a>
12716+
* @see #switchMap(Function, int)
1271212717
* @since 2.0
1271312718
*/
1271412719
@CheckReturnValue

src/main/java/io/reactivex/disposables/ActionDisposable.java

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
import io.reactivex.functions.Action;
1717
import io.reactivex.internal.util.ExceptionHelper;
1818

19+
/**
20+
* A Disposable container that manages an Action instance.
21+
*/
1922
final class ActionDisposable extends ReferenceDisposable<Action> {
2023

2124
private static final long serialVersionUID = -8219729196779211169L;

src/main/java/io/reactivex/internal/operators/flowable/BlockingFlowableMostRecent.java

-4
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ public BlockingFlowableMostRecent(Flowable<T> source, T initialValue) {
4242
public Iterator<T> iterator() {
4343
MostRecentSubscriber<T> mostRecentSubscriber = new MostRecentSubscriber<T>(initialValue);
4444

45-
/**
46-
* Subscribe instead of unsafeSubscribe since this is the final subscribe in the chain
47-
* since it is for BlockingObservable.
48-
*/
4945
source.subscribe(mostRecentSubscriber);
5046

5147
return mostRecentSubscriber.getIterable();

src/main/java/io/reactivex/internal/operators/observable/BlockingObservableMostRecent.java

-4
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ public BlockingObservableMostRecent(ObservableSource<T> source, T initialValue)
4242
public Iterator<T> iterator() {
4343
MostRecentObserver<T> mostRecentObserver = new MostRecentObserver<T>(initialValue);
4444

45-
/**
46-
* Subscribe instead of unsafeSubscribe since this is the final subscribe in the chain
47-
* since it is for BlockingObservable.
48-
*/
4945
source.subscribe(mostRecentObserver);
5046

5147
return mostRecentObserver.getIterable();

0 commit comments

Comments
 (0)