Skip to content

Commit dba6705

Browse files
authored
3.x: Cleanup and prettify Javadocs, widen XOperator throws (#6785)
* 3.x: Cleanup and prettify Javadocs, widen XOperator throws * Fix encoding of § in javadoc * Fix a wrong tag name
1 parent 747f59e commit dba6705

File tree

75 files changed

+570
-511
lines changed

Some content is hidden

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

75 files changed

+570
-511
lines changed

Diff for: src/main/java/io/reactivex/rxjava3/annotations/BackpressureKind.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ public enum BackpressureKind {
3232
*/
3333
SPECIAL,
3434
/**
35-
* The operator requests Long.MAX_VALUE from upstream but respects the backpressure
35+
* The operator requests {@link Long#MAX_VALUE} from upstream but respects the backpressure
3636
* of the downstream.
3737
*/
3838
UNBOUNDED_IN,
3939
/**
40-
* The operator will emit a MissingBackpressureException if the downstream didn't request
41-
* enough or in time.
40+
* The operator will emit a {@link io.reactivex.rxjava3.exceptions.MissingBackpressureException MissingBackpressureException}
41+
* if the downstream didn't request enough or in time.
4242
*/
4343
ERROR,
4444
/**

Diff for: src/main/java/io/reactivex/rxjava3/core/BackpressureOverflowStrategy.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919
* Options to deal with buffer overflow when using onBackpressureBuffer.
2020
*/
2121
public enum BackpressureOverflowStrategy {
22-
/** Signal a MissingBackpressureException and terminate the sequence. */
22+
/**
23+
* Signal a {@link io.reactivex.rxjava3.exceptions.MissingBackpressureException MissingBackpressureException}
24+
* and terminate the sequence.
25+
*/
2326
ERROR,
2427
/** Drop the oldest value from the buffer. */
2528
DROP_OLDEST,

Diff for: src/main/java/io/reactivex/rxjava3/core/BackpressureStrategy.java

+6-5
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,26 @@
1818
*/
1919
public enum BackpressureStrategy {
2020
/**
21-
* OnNext events are written without any buffering or dropping.
21+
* The {@code onNext} events are written without any buffering or dropping.
2222
* Downstream has to deal with any overflow.
2323
* <p>Useful when one applies one of the custom-parameter onBackpressureXXX operators.
2424
*/
2525
MISSING,
2626
/**
27-
* Signals a MissingBackpressureException in case the downstream can't keep up.
27+
* Signals a {@link io.reactivex.rxjava3.exceptions.MissingBackpressureException MissingBackpressureException}
28+
* in case the downstream can't keep up.
2829
*/
2930
ERROR,
3031
/**
31-
* Buffers <em>all</em> onNext values until the downstream consumes it.
32+
* Buffers <em>all</em> {@code onNext} values until the downstream consumes it.
3233
*/
3334
BUFFER,
3435
/**
35-
* Drops the most recent onNext value if the downstream can't keep up.
36+
* Drops the most recent {@code onNext} value if the downstream can't keep up.
3637
*/
3738
DROP,
3839
/**
39-
* Keeps only the latest onNext value, overwriting any previous value if the
40+
* Keeps only the latest {@code onNext} value, overwriting any previous value if the
4041
* downstream can't keep up.
4142
*/
4243
LATEST

Diff for: src/main/java/io/reactivex/rxjava3/core/CompletableEmitter.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ public interface CompletableEmitter {
8282
boolean isDisposed();
8383

8484
/**
85-
* Attempts to emit the specified {@code Throwable} error if the downstream
85+
* Attempts to emit the specified {@link Throwable} error if the downstream
8686
* hasn't cancelled the sequence or is otherwise terminated, returning false
8787
* if the emission is not allowed to happen due to lifecycle restrictions.
8888
* <p>
89-
* Unlike {@link #onError(Throwable)}, the {@code RxJavaPlugins.onError} is not called
90-
* if the error could not be delivered.
89+
* Unlike {@link #onError(Throwable)}, the {@link io.reactivex.rxjava3.plugins.RxJavaPlugins#onError(Throwable) RxjavaPlugins.onError}
90+
* is not called if the error could not be delivered.
9191
* <p>History: 2.1.1 - experimental
9292
* @param t the throwable error to signal if possible
9393
* @return true if successful, false if the downstream is not able to accept further

Diff for: src/main/java/io/reactivex/rxjava3/core/CompletableObserver.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@
4949
*/
5050
public interface CompletableObserver {
5151
/**
52-
* Called once by the Completable to set a Disposable on this instance which
52+
* Called once by the {@link Completable} to set a {@link Disposable} on this instance which
5353
* then can be used to cancel the subscription at any time.
54-
* @param d the Disposable instance to call dispose on for cancellation, not null
54+
* @param d the {@code Disposable} instance to call dispose on for cancellation, not null
5555
*/
5656
void onSubscribe(@NonNull Disposable d);
5757

@@ -62,7 +62,7 @@ public interface CompletableObserver {
6262

6363
/**
6464
* Called once if the deferred computation 'throws' an exception.
65-
* @param e the exception, not null.
65+
* @param e the exception, not {@code null}.
6666
*/
6767
void onError(@NonNull Throwable e);
6868
}

Diff for: src/main/java/io/reactivex/rxjava3/core/CompletableOnSubscribe.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
public interface CompletableOnSubscribe {
2424

2525
/**
26-
* Called for each CompletableObserver that subscribes.
27-
* @param emitter the safe emitter instance, never null
26+
* Called for each {@link CompletableObserver} that subscribes.
27+
* @param emitter the safe emitter instance, never {@code null}
2828
* @throws Throwable on error
2929
*/
3030
void subscribe(@NonNull CompletableEmitter emitter) throws Throwable;

Diff for: src/main/java/io/reactivex/rxjava3/core/CompletableOperator.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
@FunctionalInterface
2222
public interface CompletableOperator {
2323
/**
24-
* Applies a function to the child CompletableObserver and returns a new parent CompletableObserver.
25-
* @param observer the child CompletableObservable instance
26-
* @return the parent CompletableObserver instance
27-
* @throws Exception on failure
24+
* Applies a function to the child {@link CompletableObserver} and returns a new parent {@code CompletableObserver}.
25+
* @param observer the child {@code CompletableObserver} instance
26+
* @return the parent {@code CompletableObserver} instance
27+
* @throws Throwable on failure
2828
*/
2929
@NonNull
30-
CompletableObserver apply(@NonNull CompletableObserver observer) throws Exception;
30+
CompletableObserver apply(@NonNull CompletableObserver observer) throws Throwable;
3131
}

Diff for: src/main/java/io/reactivex/rxjava3/core/CompletableSource.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
public interface CompletableSource {
2525

2626
/**
27-
* Subscribes the given CompletableObserver to this CompletableSource instance.
28-
* @param co the CompletableObserver, not null
29-
* @throws NullPointerException if {@code co} is null
27+
* Subscribes the given {@link CompletableObserver} to this {@code CompletableSource} instance.
28+
* @param observer the {@code CompletableObserver}, not {@code null}
29+
* @throws NullPointerException if {@code observer} is {@code null}
3030
*/
31-
void subscribe(@NonNull CompletableObserver co);
31+
void subscribe(@NonNull CompletableObserver observer);
3232
}

Diff for: src/main/java/io/reactivex/rxjava3/core/CompletableTransformer.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
import io.reactivex.rxjava3.annotations.NonNull;
1717

1818
/**
19-
* Convenience interface and callback used by the compose operator to turn a Completable into another
20-
* Completable fluently.
19+
* Convenience interface and callback used by the compose operator to turn a {@link Completable} into another
20+
* {@code Completable} fluently.
2121
*/
2222
@FunctionalInterface
2323
public interface CompletableTransformer {
2424
/**
25-
* Applies a function to the upstream Completable and returns a CompletableSource.
26-
* @param upstream the upstream Completable instance
27-
* @return the transformed CompletableSource instance
25+
* Applies a function to the upstream {@link Completable} and returns a {@link CompletableSource}.
26+
* @param upstream the upstream {@code Completable} instance
27+
* @return the transformed {@code CompletableSource} instance
2828
*/
2929
@NonNull
3030
CompletableSource apply(@NonNull Completable upstream);

Diff for: src/main/java/io/reactivex/rxjava3/core/Emitter.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ public interface Emitter<T> {
2929

3030
/**
3131
* Signal a normal value.
32-
* @param value the value to signal, not null
32+
* @param value the value to signal, not {@code null}
3333
*/
3434
void onNext(@NonNull T value);
3535

3636
/**
37-
* Signal a Throwable exception.
38-
* @param error the Throwable to signal, not null
37+
* Signal a {@link Throwable} exception.
38+
* @param error the {@code Throwable} to signal, not {@code null}
3939
*/
4040
void onError(@NonNull Throwable error);
4141

0 commit comments

Comments
 (0)