Skip to content

Commit 557a600

Browse files
authored
4.x: Cleanup, wording minor things (#8186)
* 4.x: Cleanup, wording minor things * + tests, +Timed cleanup
1 parent 78230e3 commit 557a600

40 files changed

Lines changed: 157 additions & 196 deletions

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3257,8 +3257,8 @@ public final TestObserver<Void> test() {
32573257
}
32583258

32593259
/**
3260-
* Creates a {@link TestObserver} optionally in canceled state, then subscribes it to this {@code Completable}.
3261-
* @param dispose if {@code true}, the {@code TestObserver} will be canceled before subscribing to this
3260+
* Creates a {@link TestObserver} optionally in cancelled state, then subscribes it to this {@code Completable}.
3261+
* @param dispose if {@code true}, the {@code TestObserver} will be cancelled before subscribing to this
32623262
* {@code Completable}.
32633263
* <p>
32643264
* <img width="640" height="499" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.test.b.png" alt="">
@@ -3324,10 +3324,10 @@ public static Completable fromCompletionStage(@NonNull CompletionStage<?> stage)
33243324
* <p>
33253325
* <img width="640" height="323" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toCompletionStage.c.png" alt="">
33263326
* <p>
3327-
* The upstream can be canceled by converting the resulting {@code CompletionStage} into
3327+
* The upstream can be cancelled by converting the resulting {@code CompletionStage} into
33283328
* {@link CompletableFuture} via {@link CompletionStage#toCompletableFuture()} and
33293329
* calling {@link CompletableFuture#cancel(boolean)} on it.
3330-
* The upstream will be also canceled if the resulting {@code CompletionStage} is converted to and
3330+
* The upstream will be also cancelled if the resulting {@code CompletionStage} is converted to and
33313331
* completed manually by {@link CompletableFuture#complete(Object)} or {@link CompletableFuture#completeExceptionally(Throwable)}.
33323332
* <p>
33333333
* {@code CompletionStage}s don't have a notion of emptiness and allow {@code null}s, therefore, one can either use

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

Lines changed: 48 additions & 48 deletions
Large diffs are not rendered by default.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4388,7 +4388,7 @@ public final Maybe<T> retryUntil(@NonNull BooleanSupplier stop) {
43884388
* Note that the inner {@code Publisher} returned by the handler function should signal
43894389
* either {@code onNext}, {@code onError} or {@code onComplete} in response to the received
43904390
* {@code Throwable} to indicate the operator should retry or terminate. If the upstream to
4391-
* the operator is asynchronous, signalling {@code onNext} followed by {@code onComplete} immediately may
4391+
* the operator is asynchronous, signaling {@code onNext} followed by {@code onComplete} immediately may
43924392
* result in the sequence to be completed immediately. Similarly, if this inner
43934393
* {@code Publisher} signals {@code onError} or {@code onComplete} while the upstream is
43944394
* active, the sequence is terminated with the same signal immediately.
@@ -5571,7 +5571,7 @@ public final TestObserver<T> test(boolean dispose) {
55715571
* <p>
55725572
* <img width="640" height="349" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toCompletionStage.m.png" alt="">
55735573
* <p>
5574-
* The upstream can be canceled by converting the resulting {@code CompletionStage} into
5574+
* The upstream can be cancelled by converting the resulting {@code CompletionStage} into
55755575
* {@link CompletableFuture} via {@link CompletionStage#toCompletableFuture()} and
55765576
* calling {@link CompletableFuture#cancel(boolean)} on it.
55775577
* The upstream will be also cancelled if the resulting {@code CompletionStage} is converted to and
@@ -5604,7 +5604,7 @@ public final CompletionStage<T> toCompletionStage() {
56045604
* <p>
56055605
* <img width="640" height="323" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toCompletionStage.mv.png" alt="">
56065606
* <p>
5607-
* The upstream can be canceled by converting the resulting {@code CompletionStage} into
5607+
* The upstream can be cancelled by converting the resulting {@code CompletionStage} into
56085608
* {@link CompletableFuture} via {@link CompletionStage#toCompletableFuture()} and
56095609
* calling {@link CompletableFuture#cancel(boolean)} on it.
56105610
* The upstream will be also cancelled if the resulting {@code CompletionStage} is converted to and

src/main/java/io/reactivex/rxjava4/core/MaybeObserver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* <pre><code> onSubscribe (onSuccess | onError | onComplete)?</code></pre>
3232
* <p>
3333
* Note that unlike with the {@code Observable} protocol, {@link #onComplete()} is not called after the success item has been
34-
* signalled via {@link #onSuccess(Object)}.
34+
* signaled via {@link #onSuccess(Object)}.
3535
* <p>
3636
* Subscribing a {@code MaybeObserver} to multiple {@code MaybeSource}s is not recommended. If such reuse
3737
* happens, it is the duty of the {@code MaybeObserver} implementation to be ready to receive multiple calls to

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,7 +1391,7 @@ public static int bufferSize() {
13911391
* <dt><b>Error handling:</b></dt>
13921392
* <dd> If the {@code Action} throws an exception, the respective {@link Throwable} is
13931393
* delivered to the downstream via {@link Observer#onError(Throwable)},
1394-
* except when the downstream has canceled the resulting {@code Observable} source.
1394+
* except when the downstream has cancelled the resulting {@code Observable} source.
13951395
* In this latter case, the {@code Throwable} is delivered to the global error handler via
13961396
* {@link RxJavaPlugins#onError(Throwable)} as an {@link io.reactivex.rxjava4.exceptions.UndeliverableException UndeliverableException}.
13971397
* </dd>
@@ -1688,7 +1688,7 @@ public static int bufferSize() {
16881688
* <dt><b>Error handling:</b></dt>
16891689
* <dd> If the {@code Runnable} throws an exception, the respective {@code Throwable} is
16901690
* delivered to the downstream via {@link Observer#onError(Throwable)},
1691-
* except when the downstream has canceled the resulting {@code Observable} source.
1691+
* except when the downstream has cancelled the resulting {@code Observable} source.
16921692
* In this latter case, the {@code Throwable} is delivered to the global error handler via
16931693
* {@link RxJavaPlugins#onError(Throwable)} as an {@link io.reactivex.rxjava4.exceptions.UndeliverableException UndeliverableException}.
16941694
* </dd>
@@ -15923,7 +15923,7 @@ public final TestObserver<T> test(boolean dispose) { // NoPMD
1592315923
* <p>
1592415924
* <img width="640" height="313" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/firstStage.o.png" alt="">
1592515925
* <p>
15926-
* The upstream can be canceled by converting the resulting {@code CompletionStage} into
15926+
* The upstream can be cancelled by converting the resulting {@code CompletionStage} into
1592715927
* {@link CompletableFuture} via {@link CompletionStage#toCompletableFuture()} and
1592815928
* calling {@link CompletableFuture#cancel(boolean)} on it.
1592915929
* The upstream will be also cancelled if the resulting {@code CompletionStage} is converted to and
@@ -15958,7 +15958,7 @@ public final CompletionStage<T> firstStage(@Nullable T defaultItem) {
1595815958
* <p>
1595915959
* <img width="640" height="227" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/singleStage.o.png" alt="">
1596015960
* <p>
15961-
* The upstream can be canceled by converting the resulting {@code CompletionStage} into
15961+
* The upstream can be cancelled by converting the resulting {@code CompletionStage} into
1596215962
* {@link CompletableFuture} via {@link CompletionStage#toCompletableFuture()} and
1596315963
* calling {@link CompletableFuture#cancel(boolean)} on it.
1596415964
* The upstream will be also cancelled if the resulting {@code CompletionStage} is converted to and
@@ -15992,7 +15992,7 @@ public final CompletionStage<T> singleStage(@Nullable T defaultItem) {
1599215992
* <p>
1599315993
* <img width="640" height="313" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/lastStage.o.png" alt="">
1599415994
* <p>
15995-
* The upstream can be canceled by converting the resulting {@code CompletionStage} into
15995+
* The upstream can be cancelled by converting the resulting {@code CompletionStage} into
1599615996
* {@link CompletableFuture} via {@link CompletionStage#toCompletableFuture()} and
1599715997
* calling {@link CompletableFuture#cancel(boolean)} on it.
1599815998
* The upstream will be also cancelled if the resulting {@code CompletionStage} is converted to and
@@ -16026,7 +16026,7 @@ public final CompletionStage<T> lastStage(@Nullable T defaultItem) {
1602616026
* <p>
1602716027
* <img width="640" height="341" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/firstOrErrorStage.o.png" alt="">
1602816028
* <p>
16029-
* The upstream can be canceled by converting the resulting {@code CompletionStage} into
16029+
* The upstream can be cancelled by converting the resulting {@code CompletionStage} into
1603016030
* {@link CompletableFuture} via {@link CompletionStage#toCompletableFuture()} and
1603116031
* calling {@link CompletableFuture#cancel(boolean)} on it.
1603216032
* The upstream will be also cancelled if the resulting {@code CompletionStage} is converted to and
@@ -16053,7 +16053,7 @@ public final CompletionStage<T> firstOrErrorStage() {
1605316053
* <p>
1605416054
* <img width="640" height="227" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/singleOrErrorStage.o.png" alt="">
1605516055
* <p>
16056-
* The upstream can be canceled by converting the resulting {@code CompletionStage} into
16056+
* The upstream can be cancelled by converting the resulting {@code CompletionStage} into
1605716057
* {@link CompletableFuture} via {@link CompletionStage#toCompletableFuture()} and
1605816058
* calling {@link CompletableFuture#cancel(boolean)} on it.
1605916059
* The upstream will be also cancelled if the resulting {@code CompletionStage} is converted to and
@@ -16079,7 +16079,7 @@ public final CompletionStage<T> singleOrErrorStage() {
1607916079
* <p>
1608016080
* <img width="640" height="343" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/lastOrErrorStage.o.png" alt="">
1608116081
* <p>
16082-
* The upstream can be canceled by converting the resulting {@code CompletionStage} into
16082+
* The upstream can be cancelled by converting the resulting {@code CompletionStage} into
1608316083
* {@link CompletableFuture} via {@link CompletionStage#toCompletableFuture()} and
1608416084
* calling {@link CompletableFuture#cancel(boolean)} on it.
1608516085
* The upstream will be also cancelled if the resulting {@code CompletionStage} is converted to and

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5206,7 +5206,7 @@ private static <T> Single<T> toSingle(@NonNull Flowable<T> source) {
52065206
* <p>
52075207
* <img width="640" height="321" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toCompletionStage.s.png" alt="">
52085208
* <p>
5209-
* The upstream can be canceled by converting the resulting {@code CompletionStage} into
5209+
* The upstream can be cancelled by converting the resulting {@code CompletionStage} into
52105210
* {@link CompletableFuture} via {@link CompletionStage#toCompletableFuture()} and
52115211
* calling {@link CompletableFuture#cancel(boolean)} on it.
52125212
* The upstream will be also cancelled if the resulting {@code CompletionStage} is converted to and

src/main/java/io/reactivex/rxjava4/disposables/Disposable.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ static Disposable fromAction(@NonNull Action action) {
6767

6868
/**
6969
* Construct a {@code Disposable} by wrapping a {@link Future} that is
70-
* canceled exactly once when the {@code Disposable} is disposed.
70+
* cancelled exactly once when the {@code Disposable} is disposed.
7171
* <p>
72-
* The {@code Future} is canceled with {@code mayInterruptIfRunning == true}.
72+
* The {@code Future} is cancelled with {@code mayInterruptIfRunning == true}.
7373
* @param future the {@code Future} to wrap
7474
* @return the new {@code Disposable} instance
7575
* @throws NullPointerException if {@code future} is {@code null}
@@ -84,7 +84,7 @@ static Disposable fromFuture(@NonNull Future<?> future) {
8484

8585
/**
8686
* Construct a {@code Disposable} by wrapping a {@link Future} that is
87-
* canceled exactly once when the {@code Disposable} is disposed.
87+
* cancelled exactly once when the {@code Disposable} is disposed.
8888
* @param future the {@code Future} to wrap
8989
* @param allowInterrupt if true, the future cancel happens via {@code Future.cancel(true)}
9090
* @return the new {@code Disposable} instance
@@ -99,7 +99,7 @@ static Disposable fromFuture(@NonNull Future<?> future, boolean allowInterrupt)
9999

100100
/**
101101
* Construct a {@code Disposable} by wrapping a {@link Subscription} that is
102-
* canceled exactly once when the {@code Disposable} is disposed.
102+
* cancelled exactly once when the {@code Disposable} is disposed.
103103
* @param subscription the {@code Runnable} to wrap
104104
* @return the new {@code Disposable} instance
105105
* @throws NullPointerException if {@code subscription} is {@code null}

src/main/java/io/reactivex/rxjava4/exceptions/OnErrorNotImplementedException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public final class OnErrorNotImplementedException extends RuntimeException {
3131

3232
/**
3333
* Customizes the {@code Throwable} with a custom message and wraps it before it
34-
* is signalled to the {@code RxJavaPlugins.onError()} handler as {@code OnErrorNotImplementedException}.
34+
* is signaled to the {@code RxJavaPlugins.onError()} handler as {@code OnErrorNotImplementedException}.
3535
*
3636
* @param message
3737
* the message to assign to the {@code Throwable} to signal
@@ -44,7 +44,7 @@ public OnErrorNotImplementedException(String message, @NonNull Throwable e) {
4444

4545
/**
4646
* Wraps the {@code Throwable} before it
47-
* is signalled to the {@code RxJavaPlugins.onError()}
47+
* is signaled to the {@code RxJavaPlugins.onError()}
4848
* handler as {@code OnErrorNotImplementedException}.
4949
*
5050
* @param e

src/main/java/io/reactivex/rxjava4/exceptions/UndeliverableException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public final class UndeliverableException extends IllegalStateException {
3131
* @param cause the cause, not null
3232
*/
3333
public UndeliverableException(Throwable cause) {
34-
super("The exception could not be delivered to the consumer because it has already canceled/disposed the flow "
34+
super("The exception could not be delivered to the consumer because it has already cancelled/disposed the flow "
3535
+ "or the exception has nowhere to go to begin with. "
3636
+ "Further reading: https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0#error-handling | " + cause, cause);
3737
}

src/main/java/io/reactivex/rxjava4/internal/disposables/DisposableHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public static boolean set(AtomicReference<Disposable> field, Disposable d) {
6868
* or returns false if the field is non-null.
6969
* If the target field contains the common DISPOSED instance, the supplied disposable
7070
* is disposed. If the field contains other non-null Disposable, an IllegalStateException
71-
* is signalled to the RxJavaPlugins.onError hook.
71+
* is signaled to the RxJavaPlugins.onError hook.
7272
*
7373
* @param field the target field
7474
* @param d the disposable to set, not null

0 commit comments

Comments
 (0)