Skip to content

Commit 05c3429

Browse files
authored
3.x: Remove methods from test consumers, make internal versions (#6526)
1 parent de4ce93 commit 05c3429

File tree

555 files changed

+7467
-4838
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

555 files changed

+7467
-4838
lines changed

src/main/java/io/reactivex/Completable.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -2690,7 +2690,7 @@ public final TestObserver<Void> test() {
26902690

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

2709-
if (cancelled) {
2710-
to.cancel();
2709+
if (dispose) {
2710+
to.dispose();
27112711
}
27122712
subscribe(to);
27132713
return to;

src/main/java/io/reactivex/Maybe.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -4700,17 +4700,17 @@ public final TestObserver<T> test() {
47004700
* <dt><b>Scheduler:</b></dt>
47014701
* <dd>{@code test} does not operate by default on a particular {@link Scheduler}.</dd>
47024702
* </dl>
4703-
* @param cancelled if true, the TestObserver will be cancelled before subscribing to this
4703+
* @param dispose if true, the TestObserver will be dispose before subscribing to this
47044704
* Maybe.
47054705
* @return the new TestObserver instance
47064706
*/
47074707
@CheckReturnValue
47084708
@SchedulerSupport(SchedulerSupport.NONE)
4709-
public final TestObserver<T> test(boolean cancelled) {
4709+
public final TestObserver<T> test(boolean dispose) {
47104710
TestObserver<T> to = new TestObserver<T>();
47114711

4712-
if (cancelled) {
4713-
to.cancel();
4712+
if (dispose) {
4713+
to.dispose();
47144714
}
47154715

47164716
subscribe(to);

src/main/java/io/reactivex/Single.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -4030,18 +4030,18 @@ public final TestObserver<T> test() {
40304030
* <dt><b>Scheduler:</b></dt>
40314031
* <dd>{@code test} does not operate by default on a particular {@link Scheduler}.</dd>
40324032
* </dl>
4033-
* @param cancelled if true, the TestObserver will be cancelled before subscribing to this
4033+
* @param dispose if true, the TestObserver will be cancelled before subscribing to this
40344034
* Single.
40354035
* @return the new TestObserver instance
40364036
* @since 2.0
40374037
*/
40384038
@CheckReturnValue
40394039
@SchedulerSupport(SchedulerSupport.NONE)
4040-
public final TestObserver<T> test(boolean cancelled) {
4040+
public final TestObserver<T> test(boolean dispose) {
40414041
TestObserver<T> to = new TestObserver<T>();
40424042

4043-
if (cancelled) {
4044-
to.cancel();
4043+
if (dispose) {
4044+
to.dispose();
40454045
}
40464046

40474047
subscribe(to);

src/main/java/io/reactivex/internal/operators/completable/CompletableAndThenCompletable.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ static final class NextObserver implements CompletableObserver {
8484

8585
final CompletableObserver downstream;
8686

87-
public NextObserver(AtomicReference<Disposable> parent, CompletableObserver downstream) {
87+
NextObserver(AtomicReference<Disposable> parent, CompletableObserver downstream) {
8888
this.parent = parent;
8989
this.downstream = downstream;
9090
}

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

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public Publisher<T> source() {
6161
}
6262

6363
/**
64+
* The internal buffer size of this FloawblePublishAlt operator.
6465
* @return The internal buffer size of this FloawblePublishAlt operator.
6566
*/
6667
public int publishBufferSize() {

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ static final class PublishConnection<T>
149149
Throwable error;
150150

151151
@SuppressWarnings("unchecked")
152-
public PublishConnection(AtomicReference<PublishConnection<T>> current) {
152+
PublishConnection(AtomicReference<PublishConnection<T>> current) {
153153
this.connect = new AtomicBoolean();
154154
this.current = current;
155155
this.upstream = new AtomicReference<Disposable>();
@@ -268,7 +268,7 @@ static final class InnerDisposable<T>
268268

269269
final Observer<? super T> downstream;
270270

271-
public InnerDisposable(Observer<? super T> downstream, PublishConnection<T> parent) {
271+
InnerDisposable(Observer<? super T> downstream, PublishConnection<T> parent) {
272272
this.downstream = downstream;
273273
lazySet(parent);
274274
}

0 commit comments

Comments
 (0)