Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.x: Fix self-see references, some comments #6729

Merged
merged 1 commit into from
Nov 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/main/java/io/reactivex/rxjava3/core/Flowable.java
Original file line number Diff line number Diff line change
Expand Up @@ -8134,7 +8134,6 @@ public final Single<Boolean> contains(final Object item) {
* @return a Single that emits a single item: the number of items emitted by the source Publisher as a
* 64-bit Long item
* @see <a href="http://reactivex.io/documentation/operators/count.html">ReactiveX operators documentation: Count</a>
* @see #count()
*/
@CheckReturnValue
@BackpressureSupport(BackpressureKind.UNBOUNDED_IN)
Expand Down Expand Up @@ -14978,6 +14977,7 @@ public final Flowable<T> switchIfEmpty(Publisher<? extends T> other) {
* Publisher
* @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
* @see <a href="http://reactivex.io/documentation/operators/flatmap.html">ReactiveX operators documentation: FlatMap</a>
* @see #switchMapDelayError(Function)
*/
@CheckReturnValue
@BackpressureSupport(BackpressureKind.FULL)
Expand Down Expand Up @@ -15013,6 +15013,7 @@ public final <R> Flowable<R> switchMap(Function<? super T, ? extends Publisher<?
* the number of elements to prefetch from the current active inner Publisher
* @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
* @see <a href="http://reactivex.io/documentation/operators/flatmap.html">ReactiveX operators documentation: FlatMap</a>
* @see #switchMapDelayError(Function, int)
*/
@CheckReturnValue
@BackpressureSupport(BackpressureKind.FULL)
Expand Down Expand Up @@ -15102,7 +15103,7 @@ public final Completable switchMapCompletable(@NonNull Function<? super T, ? ext
* {@link CompletableSource} to be subscribed to and awaited for
* (non blockingly) for its terminal event
* @return the new Completable instance
* @see #switchMapCompletableDelayError(Function)
* @see #switchMapCompletable(Function)
* @since 2.2
*/
@CheckReturnValue
Expand Down Expand Up @@ -15140,6 +15141,7 @@ public final Completable switchMapCompletableDelayError(@NonNull Function<? supe
* Publisher
* @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
* @see <a href="http://reactivex.io/documentation/operators/flatmap.html">ReactiveX operators documentation: FlatMap</a>
* @see #switchMap(Function)
* @since 2.0
*/
@CheckReturnValue
Expand Down Expand Up @@ -15177,6 +15179,7 @@ public final <R> Flowable<R> switchMapDelayError(Function<? super T, ? extends P
* the number of elements to prefetch from the current active inner Publisher
* @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
* @see <a href="http://reactivex.io/documentation/operators/flatmap.html">ReactiveX operators documentation: FlatMap</a>
* @see #switchMap(Function, int)
* @since 2.0
*/
@CheckReturnValue
Expand Down Expand Up @@ -15229,7 +15232,7 @@ <R> Flowable<R> switchMap0(Function<? super T, ? extends Publisher<? extends R>>
* return a {@code MaybeSource} to replace the current active inner source
* and get subscribed to.
* @return the new Flowable instance
* @see #switchMapMaybe(Function)
* @see #switchMapMaybeDelayError(Function)
* @since 2.2
*/
@CheckReturnValue
Expand Down Expand Up @@ -15301,7 +15304,7 @@ public final <R> Flowable<R> switchMapMaybeDelayError(@NonNull Function<? super
* return a {@code SingleSource} to replace the current active inner source
* and get subscribed to.
* @return the new Flowable instance
* @see #switchMapSingle(Function)
* @see #switchMapSingleDelayError(Function)
* @since 2.2
*/
@CheckReturnValue
Expand Down
11 changes: 8 additions & 3 deletions src/main/java/io/reactivex/rxjava3/core/Observable.java
Original file line number Diff line number Diff line change
Expand Up @@ -7191,7 +7191,6 @@ public final Single<Boolean> contains(final Object element) {
* @return a Single that emits a single item: the number of items emitted by the source ObservableSource as a
* 64-bit Long item
* @see <a href="http://reactivex.io/documentation/operators/count.html">ReactiveX operators documentation: Count</a>
* @see #count()
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
Expand Down Expand Up @@ -12357,6 +12356,7 @@ public final Observable<T> switchIfEmpty(ObservableSource<? extends T> other) {
* ObservableSource
* @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
* @see <a href="http://reactivex.io/documentation/operators/flatmap.html">ReactiveX operators documentation: FlatMap</a>
* @see #switchMapDelayError(Function)
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
Expand Down Expand Up @@ -12386,6 +12386,7 @@ public final <R> Observable<R> switchMap(Function<? super T, ? extends Observabl
* the number of elements to prefetch from the current active inner ObservableSource
* @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
* @see <a href="http://reactivex.io/documentation/operators/flatmap.html">ReactiveX operators documentation: FlatMap</a>
* @see #switchMapDelayError(Function, int)
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
Expand Down Expand Up @@ -12476,7 +12477,7 @@ public final Completable switchMapCompletable(@NonNull Function<? super T, ? ext
* {@link CompletableSource} to be subscribed to and awaited for
* (non blockingly) for its terminal event
* @return the new Completable instance
* @see #switchMapCompletableDelayError(Function)
* @see #switchMapCompletable(Function)
* @since 2.2
*/
@CheckReturnValue
Expand Down Expand Up @@ -12512,7 +12513,7 @@ public final Completable switchMapCompletableDelayError(@NonNull Function<? supe
* return a {@code MaybeSource} to replace the current active inner source
* and get subscribed to.
* @return the new Observable instance
* @see #switchMapMaybe(Function)
* @see #switchMapMaybeDelayError(Function)
* @since 2.2
*/
@CheckReturnValue
Expand Down Expand Up @@ -12568,6 +12569,7 @@ public final <R> Observable<R> switchMapMaybeDelayError(@NonNull Function<? supe
* SingleSource
* @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
* @see <a href="http://reactivex.io/documentation/operators/flatmap.html">ReactiveX operators documentation: FlatMap</a>
* @see #switchMapSingleDelayError(Function)
* @since 2.2
*/
@CheckReturnValue
Expand Down Expand Up @@ -12599,6 +12601,7 @@ public final <R> Observable<R> switchMapSingle(@NonNull Function<? super T, ? ex
* SingleSource
* @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
* @see <a href="http://reactivex.io/documentation/operators/flatmap.html">ReactiveX operators documentation: FlatMap</a>
* @see #switchMapSingle(Function)
* @since 2.2
*/
@CheckReturnValue
Expand Down Expand Up @@ -12630,6 +12633,7 @@ public final <R> Observable<R> switchMapSingleDelayError(@NonNull Function<? sup
* ObservableSource
* @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
* @see <a href="http://reactivex.io/documentation/operators/flatmap.html">ReactiveX operators documentation: FlatMap</a>
* @see #switchMap(Function)
* @since 2.0
*/
@CheckReturnValue
Expand Down Expand Up @@ -12661,6 +12665,7 @@ public final <R> Observable<R> switchMapDelayError(Function<? super T, ? extends
* the number of elements to prefetch from the current active inner ObservableSource
* @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
* @see <a href="http://reactivex.io/documentation/operators/flatmap.html">ReactiveX operators documentation: FlatMap</a>
* @see #switchMap(Function, int)
* @since 2.0
*/
@CheckReturnValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
import io.reactivex.rxjava3.functions.Action;
import io.reactivex.rxjava3.internal.util.ExceptionHelper;

/**
* A Disposable container that manages an Action instance.
*/
final class ActionDisposable extends ReferenceDisposable<Action> {

private static final long serialVersionUID = -8219729196779211169L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ public BlockingFlowableMostRecent(Flowable<T> source, T initialValue) {
public Iterator<T> iterator() {
MostRecentSubscriber<T> mostRecentSubscriber = new MostRecentSubscriber<T>(initialValue);

/**
* Subscribe instead of unsafeSubscribe since this is the final subscribe in the chain
* since it is for BlockingObservable.
*/
source.subscribe(mostRecentSubscriber);

return mostRecentSubscriber.getIterable();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ public BlockingObservableMostRecent(ObservableSource<T> source, T initialValue)
public Iterator<T> iterator() {
MostRecentObserver<T> mostRecentObserver = new MostRecentObserver<T>(initialValue);

/**
* Subscribe instead of unsafeSubscribe since this is the final subscribe in the chain
* since it is for BlockingObservable.
*/
source.subscribe(mostRecentObserver);

return mostRecentObserver.getIterable();
Expand Down