Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Quick Javadoc fixes. #6943

Merged
merged 14 commits into from
Apr 7, 2020
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@
* the operator goes from Flowable to some other reactive type and then the sequence calls
* for toFlowable again:
* <pre>
* Single&lt;Integer> single = Flowable.range(1, 10).reduce((a, b) -> a + b);
* Flowable&lt;Integer> flowable = single.toFlowable();
* {@code
* Single<Integer> single = Flowable.range(1, 10).reduce((a, b) -> a + b);
* Flowable<Integer> flowable = single.toFlowable();
* }
* </pre>
*
* The {@code Single.toFlowable()} will check for this interface and call the {@link #fuseToFlowable()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@
* the operator goes from Maybe to some other reactive type and then the sequence calls
* for toMaybe again:
* <pre>
* Single&lt;Integer> single = Maybe.just(1).isEmpty();
* Maybe&lt;Integer> maybe = single.toMaybe();
* {@code
* Single<Integer> single = Maybe.just(1).isEmpty();
* Maybe<Integer> maybe = single.toMaybe();
* }
* </pre>
*
* The {@code Single.toMaybe()} will check for this interface and call the {@link #fuseToMaybe()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@
* the operator goes from Observable to some other reactive type and then the sequence calls
* for toObservable again:
* <pre>
* Single&lt;Integer> single = Observable.range(1, 10).reduce((a, b) -> a + b);
* Observable&lt;Integer> observable = single.toObservable();
* {@code
* Single<Integer> single = Observable.range(1, 10).reduce((a, b) -> a + b);
* Observable<Integer> observable = single.toObservable();
* }
* </pre>
*
* The {@code Single.toObservable()} will check for this interface and call the {@link #fuseToObservable()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,13 @@
* thread pool:
*
* <pre>
* {@code
* Scheduler limitScheduler = Schedulers.computation().when(workers -> {
* // use merge max concurrent to limit the number of concurrent
* // callbacks two at a time
* return Completable.merge(Observable.merge(workers), 2);
* });
* }
* </pre>
* <p>
* This is a slightly different way to limit the concurrency but it has some
Expand All @@ -71,11 +73,13 @@
* to the second.
*
* <pre>
* {@code
* Scheduler limitScheduler = Schedulers.computation().when(workers -> {
* // use merge max concurrent to limit the number of concurrent
* // Observables two at a time
* return Completable.merge(Observable.merge(workers, 2));
* });
* }
* </pre>
*
* Slowing down the rate to no more than than 1 a second. This suffers from the
Expand All @@ -84,13 +88,15 @@
* algorithm).
*
* <pre>
* {@code
* Scheduler slowScheduler = Schedulers.computation().when(workers -> {
* // use concatenate to make each worker happen one at a time.
* return Completable.concat(workers.map(actions -> {
* return Completable.concat(workers.map(actions ->} {
* // delay the starting of the next worker by 1 second.
* return Completable.merge(actions.delaySubscription(1, TimeUnit.SECONDS));
* }));
* });
* }
* </pre>
* <p>History 2.0.1 - experimental
* @since 2.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ public void nextWithCallingHasNextMultipleTimes() {

/**
* Confirm that no buffering or blocking of the Observable onNext calls occurs and it just grabs the next emitted value.
* <p/>
* This results in output such as => a: 1 b: 2 c: 89
* <p>
* This results in output such as {@code => a: 1 b: 2 c: 89}
*
* @throws Throwable some method call is declared throws
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ public void nextWithCallingHasNextMultipleTimes() {

/**
* Confirm that no buffering or blocking of the Observable onNext calls occurs and it just grabs the next emitted value.
* <p/>
* This results in output such as => a: 1 b: 2 c: 89
* <p>
* This results in output such as {@code => a: 1 b: 2 c: 89}
*
* @throws Throwable some method call is declared throws
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,11 +340,11 @@ public void onNext(String t) {
*
* When using SynchronizedSubscriber we get this output:
*
* p1: 18 p2: 68 => should be close to each other unless we have thread starvation
* {@code p1: 18 p2: 68 => should be close to each other unless we have thread starvation}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No reason to include "should be close to each other unless we have thread starvation" in the code block.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're correct, just did the whole line for cosmetic reasons, but I can surely remove the rest of the statement from it.

*
* When using SerializedObserver we get:
*
* p1: 1 p2: 2445261 => should be close to each other unless we have thread starvation
* {@code p1: 1 p2: 2445261 => should be close to each other unless we have thread starvation}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No reason to include "should be close to each other unless we have thread starvation" in the code block.

*
* This demonstrates how SynchronizedSubscriber balances back and forth better, and blocks emission.
* The real issue in this example is the async buffer-bloat, so we need backpressure.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,11 +341,11 @@ public void onNext(String t) {
*
* When using SynchronizedSubscriber we get this output:
*
* p1: 18 p2: 68 => should be close to each other unless we have thread starvation
* {@code p1: 18 p2: 68 => should be close to each other unless we have thread starvation}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No reason to include "should be close to each other unless we have thread starvation" in the code block.

*
* When using SerializedSubscriber we get:
*
* p1: 1 p2: 2445261 => should be close to each other unless we have thread starvation
* {@code p1: 1 p2: 2445261 => should be close to each other unless we have thread starvation}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No reason to include "should be close to each other unless we have thread starvation" in the code block.

*
* This demonstrates how SynchronizedSubscriber balances back and forth better, and blocks emission.
* The real issue in this example is the async buffer-bloat, so we need backpressure.
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/io/reactivex/rxjava3/tck/BaseTck.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public long maxElementsFromPublisher() {

/**
* Creates an Iterable with the specified number of elements or an infinite one if
* elements > {@link Integer#MAX_VALUE}.
* {@code elements > {@link Integer#MAX_VALUE}.}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks the link I think.

* @param elements the number of elements to return, {@link Integer#MAX_VALUE} means an infinite sequence
* @return the Iterable
*/
Expand Down