Skip to content

Commit a35832a

Browse files
committed
align naming of Completable onDispose arguments
1 parent b0e8bc8 commit a35832a

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@ public final Completable doOnComplete(Action onComplete) {
956956
* <dt><b>Scheduler:</b></dt>
957957
* <dd>{@code doOnDispose} does not operate by default on a particular {@link Scheduler}.</dd>
958958
* </dl>
959-
* @param onDispose the callback to call when the child subscriber cancels the subscription
959+
* @param onDispose the callback to call when the child subscriber disposes the subscription
960960
* @return the new Completable instance
961961
* @throws NullPointerException if onDispose is null
962962
*/
@@ -995,7 +995,7 @@ public final Completable doOnError(Consumer<? super Throwable> onError) {
995995
* @param onError the consumer called when this emits an onError event
996996
* @param onComplete the runnable called just before when this Completable completes normally
997997
* @param onAfterTerminate the runnable called after this Completable completes normally
998-
* @param onDisposed the runnable called when the child cancels the subscription
998+
* @param onDispose the runnable called when the child disposes the subscription
999999
* @return the new Completable instance
10001000
*/
10011001
@SchedulerSupport(SchedulerSupport.NONE)
@@ -1005,14 +1005,14 @@ private Completable doOnLifecycle(
10051005
final Action onComplete,
10061006
final Action onTerminate,
10071007
final Action onAfterTerminate,
1008-
final Action onDisposed) {
1008+
final Action onDispose) {
10091009
ObjectHelper.requireNonNull(onSubscribe, "onSubscribe is null");
10101010
ObjectHelper.requireNonNull(onError, "onError is null");
10111011
ObjectHelper.requireNonNull(onComplete, "onComplete is null");
10121012
ObjectHelper.requireNonNull(onTerminate, "onTerminate is null");
10131013
ObjectHelper.requireNonNull(onAfterTerminate, "onAfterTerminate is null");
1014-
ObjectHelper.requireNonNull(onDisposed, "onDisposed is null");
1015-
return RxJavaPlugins.onAssembly(new CompletablePeek(this, onSubscribe, onError, onComplete, onTerminate, onAfterTerminate, onDisposed));
1014+
ObjectHelper.requireNonNull(onDispose, "onDispose is null");
1015+
return RxJavaPlugins.onAssembly(new CompletablePeek(this, onSubscribe, onError, onComplete, onTerminate, onAfterTerminate, onDispose));
10161016
}
10171017

10181018
/**

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,21 @@ public final class CompletablePeek extends Completable {
2828
final Action onComplete;
2929
final Action onTerminate;
3030
final Action onAfterTerminate;
31-
final Action onDisposed;
31+
final Action onDispose;
3232

3333
public CompletablePeek(CompletableSource source, Consumer<? super Disposable> onSubscribe,
3434
Consumer<? super Throwable> onError,
3535
Action onComplete,
3636
Action onTerminate,
3737
Action onAfterTerminate,
38-
Action onDisposed) {
38+
Action onDispose) {
3939
this.source = source;
4040
this.onSubscribe = onSubscribe;
4141
this.onError = onError;
4242
this.onComplete = onComplete;
4343
this.onTerminate = onTerminate;
4444
this.onAfterTerminate = onAfterTerminate;
45-
this.onDisposed = onDisposed;
45+
this.onDispose = onDispose;
4646
}
4747

4848
@Override
@@ -107,7 +107,7 @@ public void onSubscribe(final Disposable d) {
107107
@Override
108108
public void run() {
109109
try {
110-
onDisposed.run();
110+
onDispose.run();
111111
} catch (Throwable e) {
112112
Exceptions.throwIfFatal(e);
113113
RxJavaPlugins.onError(e);

0 commit comments

Comments
 (0)