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: Remove methods from test consumers, make internal versions #6526

Merged
merged 1 commit into from
Jun 20, 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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions src/main/java/io/reactivex/Completable.java
Original file line number Diff line number Diff line change
Expand Up @@ -2690,7 +2690,7 @@ public final TestObserver<Void> test() {

/**
* Creates a TestObserver optionally in cancelled state, then subscribes it to this Completable.
* @param cancelled if true, the TestObserver will be cancelled before subscribing to this
* @param dispose if true, the TestObserver will be cancelled before subscribing to this
* Completable.
* <p>
* <img width="640" height="499" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.test.b.png" alt="">
Expand All @@ -2703,11 +2703,11 @@ public final TestObserver<Void> test() {
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final TestObserver<Void> test(boolean cancelled) {
public final TestObserver<Void> test(boolean dispose) {
TestObserver<Void> to = new TestObserver<Void>();

if (cancelled) {
to.cancel();
if (dispose) {
to.dispose();
}
subscribe(to);
return to;
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/io/reactivex/Maybe.java
Original file line number Diff line number Diff line change
Expand Up @@ -4700,17 +4700,17 @@ public final TestObserver<T> test() {
* <dt><b>Scheduler:</b></dt>
* <dd>{@code test} does not operate by default on a particular {@link Scheduler}.</dd>
* </dl>
* @param cancelled if true, the TestObserver will be cancelled before subscribing to this
* @param dispose if true, the TestObserver will be dispose before subscribing to this
* Maybe.
* @return the new TestObserver instance
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final TestObserver<T> test(boolean cancelled) {
public final TestObserver<T> test(boolean dispose) {
TestObserver<T> to = new TestObserver<T>();

if (cancelled) {
to.cancel();
if (dispose) {
to.dispose();
}

subscribe(to);
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/io/reactivex/Single.java
Original file line number Diff line number Diff line change
Expand Up @@ -4030,18 +4030,18 @@ public final TestObserver<T> test() {
* <dt><b>Scheduler:</b></dt>
* <dd>{@code test} does not operate by default on a particular {@link Scheduler}.</dd>
* </dl>
* @param cancelled if true, the TestObserver will be cancelled before subscribing to this
* @param dispose if true, the TestObserver will be cancelled before subscribing to this
* Single.
* @return the new TestObserver instance
* @since 2.0
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public final TestObserver<T> test(boolean cancelled) {
public final TestObserver<T> test(boolean dispose) {
TestObserver<T> to = new TestObserver<T>();

if (cancelled) {
to.cancel();
if (dispose) {
to.dispose();
}

subscribe(to);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ static final class NextObserver implements CompletableObserver {

final CompletableObserver downstream;

public NextObserver(AtomicReference<Disposable> parent, CompletableObserver downstream) {
NextObserver(AtomicReference<Disposable> parent, CompletableObserver downstream) {
this.parent = parent;
this.downstream = downstream;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public Publisher<T> source() {
}

/**
* The internal buffer size of this FloawblePublishAlt operator.
* @return The internal buffer size of this FloawblePublishAlt operator.
*/
public int publishBufferSize() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ static final class PublishConnection<T>
Throwable error;

@SuppressWarnings("unchecked")
public PublishConnection(AtomicReference<PublishConnection<T>> current) {
PublishConnection(AtomicReference<PublishConnection<T>> current) {
this.connect = new AtomicBoolean();
this.current = current;
this.upstream = new AtomicReference<Disposable>();
Expand Down Expand Up @@ -268,7 +268,7 @@ static final class InnerDisposable<T>

final Observer<? super T> downstream;

public InnerDisposable(Observer<? super T> downstream, PublishConnection<T> parent) {
InnerDisposable(Observer<? super T> downstream, PublishConnection<T> parent) {
this.downstream = downstream;
lazySet(parent);
}
Expand Down
Loading