Skip to content

Commit 579e90d

Browse files
authored
2.x: Cleaunp - rename fields to upstream and downstream (#6129)
* 2.x: Cleaunp - rename fields to upstream and downstream * Make links in MaybeEmitter.setDisposable
1 parent c8b0a0e commit 579e90d

File tree

526 files changed

+5499
-5325
lines changed

Some content is hidden

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

526 files changed

+5499
-5325
lines changed

src/jmh/java/io/reactivex/MemoryPerf.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ static long memoryUse() {
3535

3636
static final class MyRx2Subscriber implements FlowableSubscriber<Object> {
3737

38-
org.reactivestreams.Subscription s;
38+
org.reactivestreams.Subscription upstream;
3939

4040
@Override
4141
public void onSubscribe(Subscription s) {
42-
this.s = s;
42+
this.upstream = s;
4343
}
4444

4545
@Override
@@ -61,11 +61,11 @@ public void onNext(Object t) {
6161
static final class MyRx2Observer implements io.reactivex.Observer<Object>, io.reactivex.SingleObserver<Object>,
6262
io.reactivex.MaybeObserver<Object>, io.reactivex.CompletableObserver {
6363

64-
Disposable s;
64+
Disposable upstream;
6565

6666
@Override
67-
public void onSubscribe(Disposable s) {
68-
this.s = s;
67+
public void onSubscribe(Disposable d) {
68+
this.upstream = d;
6969
}
7070

7171
@Override

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1622,11 +1622,11 @@ public final Completable doFinally(Action onFinally) {
16221622
* // and subsequently this class has to send a Disposable to the downstream.
16231623
* // Note that relaying the upstream's Disposable directly is not allowed in RxJava
16241624
* &#64;Override
1625-
* public void onSubscribe(Disposable s) {
1625+
* public void onSubscribe(Disposable d) {
16261626
* if (upstream != null) {
1627-
* s.cancel();
1627+
* d.dispose();
16281628
* } else {
1629-
* upstream = s;
1629+
* upstream = d;
16301630
* downstream.onSubscribe(this);
16311631
* }
16321632
* }

src/main/java/io/reactivex/CompletableEmitter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ public interface CompletableEmitter {
5959
void onError(@NonNull Throwable t);
6060

6161
/**
62-
* Sets a Disposable on this emitter; any previous Disposable
63-
* or Cancellation will be disposed/cancelled.
62+
* Sets a Disposable on this emitter; any previous {@link Disposable}
63+
* or {@link Cancellable} will be disposed/cancelled.
6464
* @param d the disposable, null is allowed
6565
*/
6666
void setDisposable(@Nullable Disposable d);
6767

6868
/**
69-
* Sets a Cancellable on this emitter; any previous Disposable
70-
* or Cancellation will be disposed/cancelled.
69+
* Sets a Cancellable on this emitter; any previous {@link Disposable}
70+
* or {@link Cancellable} will be disposed/cancelled.
7171
* @param c the cancellable resource, null is allowed
7272
*/
7373
void setCancellable(@Nullable Cancellable c);

src/main/java/io/reactivex/CompletableSource.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ public interface CompletableSource {
2424

2525
/**
2626
* Subscribes the given CompletableObserver to this CompletableSource instance.
27-
* @param cs the CompletableObserver, not null
28-
* @throws NullPointerException if {@code cs} is null
27+
* @param co the CompletableObserver, not null
28+
* @throws NullPointerException if {@code co} is null
2929
*/
30-
void subscribe(@NonNull CompletableObserver cs);
30+
void subscribe(@NonNull CompletableObserver co);
3131
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10787,7 +10787,7 @@ public final Single<T> lastOrError() {
1078710787
*
1078810788
* // In the subscription phase, the upstream sends a Subscription to this class
1078910789
* // and subsequently this class has to send a Subscription to the downstream.
10790-
* // Note that relaying the upstream's Subscription directly is not allowed in RxJava
10790+
* // Note that relaying the upstream's Subscription instance directly is not allowed in RxJava
1079110791
* &#64;Override
1079210792
* public void onSubscribe(Subscription s) {
1079310793
* if (upstream != null) {

src/main/java/io/reactivex/FlowableEmitter.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@
5151
public interface FlowableEmitter<T> extends Emitter<T> {
5252

5353
/**
54-
* Sets a Disposable on this emitter; any previous Disposable
55-
* or Cancellation will be disposed/cancelled.
56-
* @param s the disposable, null is allowed
54+
* Sets a Disposable on this emitter; any previous {@link Disposable}
55+
* or {@link Cancellable} will be disposed/cancelled.
56+
* @param d the disposable, null is allowed
5757
*/
58-
void setDisposable(@Nullable Disposable s);
58+
void setDisposable(@Nullable Disposable d);
5959

6060
/**
61-
* Sets a Cancellable on this emitter; any previous Disposable
62-
* or Cancellation will be disposed/cancelled.
61+
* Sets a Cancellable on this emitter; any previous {@link Disposable}
62+
* or {@link Cancellable} will be disposed/cancelled.
6363
* @param c the cancellable resource, null is allowed
6464
*/
6565
void setCancellable(@Nullable Cancellable c);

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3237,11 +3237,11 @@ public final Single<Boolean> isEmpty() {
32373237
* // and subsequently this class has to send a Disposable to the downstream.
32383238
* // Note that relaying the upstream's Disposable directly is not allowed in RxJava
32393239
* &#64;Override
3240-
* public void onSubscribe(Disposable s) {
3240+
* public void onSubscribe(Disposable d) {
32413241
* if (upstream != null) {
3242-
* s.cancel();
3242+
* d.dispose();
32433243
* } else {
3244-
* upstream = s;
3244+
* upstream = d;
32453245
* downstream.onSubscribe(this);
32463246
* }
32473247
* }

src/main/java/io/reactivex/MaybeEmitter.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ public interface MaybeEmitter<T> {
6767
void onComplete();
6868

6969
/**
70-
* Sets a Disposable on this emitter; any previous Disposable
71-
* or Cancellation will be unsubscribed/cancelled.
72-
* @param s the disposable, null is allowed
70+
* Sets a Disposable on this emitter; any previous {@link Disposable}
71+
* or {@link Cancellable} will be disposed/cancelled.
72+
* @param d the disposable, null is allowed
7373
*/
74-
void setDisposable(@Nullable Disposable s);
74+
void setDisposable(@Nullable Disposable d);
7575

7676
/**
77-
* Sets a Cancellable on this emitter; any previous Disposable
78-
* or Cancellation will be unsubscribed/cancelled.
77+
* Sets a Cancellable on this emitter; any previous {@link Disposable}
78+
* or {@link Cancellable} will be disposed/cancelled.
7979
* @param c the cancellable resource, null is allowed
8080
*/
8181
void setCancellable(@Nullable Cancellable c);

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9409,11 +9409,11 @@ public final Single<T> lastOrError() {
94099409
* // and subsequently this class has to send a Disposable to the downstream.
94109410
* // Note that relaying the upstream's Disposable directly is not allowed in RxJava
94119411
* &#64;Override
9412-
* public void onSubscribe(Disposable s) {
9412+
* public void onSubscribe(Disposable d) {
94139413
* if (upstream != null) {
9414-
* s.dispose();
9414+
* d.dispose();
94159415
* } else {
9416-
* upstream = s;
9416+
* upstream = d;
94179417
* downstream.onSubscribe(this);
94189418
* }
94199419
* }

src/main/java/io/reactivex/ObservableEmitter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@
5050
public interface ObservableEmitter<T> extends Emitter<T> {
5151

5252
/**
53-
* Sets a Disposable on this emitter; any previous Disposable
54-
* or Cancellation will be unsubscribed/cancelled.
53+
* Sets a Disposable on this emitter; any previous {@link Disposable}
54+
* or {@link Cancellable} will be disposed/cancelled.
5555
* @param d the disposable, null is allowed
5656
*/
5757
void setDisposable(@Nullable Disposable d);
5858

5959
/**
60-
* Sets a Cancellable on this emitter; any previous Disposable
61-
* or Cancellation will be unsubscribed/cancelled.
60+
* Sets a Cancellable on this emitter; any previous {@link Disposable}
61+
* or {@link Cancellable} will be disposed/cancelled.
6262
* @param c the cancellable resource, null is allowed
6363
*/
6464
void setCancellable(@Nullable Cancellable c);

0 commit comments

Comments
 (0)