Skip to content

Commit 51de021

Browse files
authored
docs: Quick Javadoc fixes. (ReactiveX#6943)
* docs: Quick Javadoc fixes. Added @code tag wherever < or > were used, also removed a few self-closing <p> tags. Both of these issues cause errors with the latest version of Javadoc. Signed-off-by: Zachary Trant <[email protected]> * Update FuseToFlowable.java * Update FuseToMaybe.java * Update FuseToObservable.java * Update SchedulerWhen.java * Update BlockingFlowableNextTest.java * Update BlockingObservableNextTest.java * Update SerializedObserverTest.java * Update SerializedObserverTest.java * Update SerializedObserverTest.java * Update SerializedSubscriberTest.java * Update BaseTck.java * Update SchedulerWhen.java * Update SerializedObserverTest.java
1 parent c13ba60 commit 51de021

File tree

9 files changed

+28
-17
lines changed

9 files changed

+28
-17
lines changed

src/main/java/io/reactivex/rxjava3/internal/fuseable/FuseToFlowable.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@
2121
* the operator goes from Flowable to some other reactive type and then the sequence calls
2222
* for toFlowable again:
2323
* <pre>
24-
* Single&lt;Integer> single = Flowable.range(1, 10).reduce((a, b) -> a + b);
25-
* Flowable&lt;Integer> flowable = single.toFlowable();
24+
* {@code
25+
* Single<Integer> single = Flowable.range(1, 10).reduce((a, b) -> a + b);
26+
* Flowable<Integer> flowable = single.toFlowable();
27+
* }
2628
* </pre>
2729
*
2830
* The {@code Single.toFlowable()} will check for this interface and call the {@link #fuseToFlowable()}

src/main/java/io/reactivex/rxjava3/internal/fuseable/FuseToMaybe.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@
2121
* the operator goes from Maybe to some other reactive type and then the sequence calls
2222
* for toMaybe again:
2323
* <pre>
24-
* Single&lt;Integer> single = Maybe.just(1).isEmpty();
25-
* Maybe&lt;Integer> maybe = single.toMaybe();
24+
* {@code
25+
* Single<Integer> single = Maybe.just(1).isEmpty();
26+
* Maybe<Integer> maybe = single.toMaybe();
27+
* }
2628
* </pre>
2729
*
2830
* The {@code Single.toMaybe()} will check for this interface and call the {@link #fuseToMaybe()}

src/main/java/io/reactivex/rxjava3/internal/fuseable/FuseToObservable.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@
2121
* the operator goes from Observable to some other reactive type and then the sequence calls
2222
* for toObservable again:
2323
* <pre>
24-
* Single&lt;Integer> single = Observable.range(1, 10).reduce((a, b) -> a + b);
25-
* Observable&lt;Integer> observable = single.toObservable();
24+
* {@code
25+
* Single<Integer> single = Observable.range(1, 10).reduce((a, b) -> a + b);
26+
* Observable<Integer> observable = single.toObservable();
27+
* }
2628
* </pre>
2729
*
2830
* The {@code Single.toObservable()} will check for this interface and call the {@link #fuseToObservable()}

src/main/java/io/reactivex/rxjava3/internal/schedulers/SchedulerWhen.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,13 @@
5353
* thread pool:
5454
*
5555
* <pre>
56+
* {@code
5657
* Scheduler limitScheduler = Schedulers.computation().when(workers -> {
5758
* // use merge max concurrent to limit the number of concurrent
5859
* // callbacks two at a time
5960
* return Completable.merge(Observable.merge(workers), 2);
6061
* });
62+
* }
6163
* </pre>
6264
* <p>
6365
* This is a slightly different way to limit the concurrency but it has some
@@ -71,11 +73,13 @@
7173
* to the second.
7274
*
7375
* <pre>
76+
* {@code
7477
* Scheduler limitScheduler = Schedulers.computation().when(workers -> {
7578
* // use merge max concurrent to limit the number of concurrent
7679
* // Observables two at a time
7780
* return Completable.merge(Observable.merge(workers, 2));
7881
* });
82+
* }
7983
* </pre>
8084
*
8185
* Slowing down the rate to no more than than 1 a second. This suffers from the
@@ -84,13 +88,15 @@
8488
* algorithm).
8589
*
8690
* <pre>
91+
* {@code
8792
* Scheduler slowScheduler = Schedulers.computation().when(workers -> {
8893
* // use concatenate to make each worker happen one at a time.
8994
* return Completable.concat(workers.map(actions -> {
9095
* // delay the starting of the next worker by 1 second.
9196
* return Completable.merge(actions.delaySubscription(1, TimeUnit.SECONDS));
9297
* }));
9398
* });
99+
* }
94100
* </pre>
95101
* <p>History 2.0.1 - experimental
96102
* @since 2.1

src/test/java/io/reactivex/rxjava3/internal/operators/flowable/BlockingFlowableNextTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ public void nextWithCallingHasNextMultipleTimes() {
223223

224224
/**
225225
* Confirm that no buffering or blocking of the Observable onNext calls occurs and it just grabs the next emitted value.
226-
* <p/>
227-
* This results in output such as => a: 1 b: 2 c: 89
226+
* <p>
227+
* This results in output such as {@code => a: 1 b: 2 c: 89}
228228
*
229229
* @throws Throwable some method call is declared throws
230230
*/

src/test/java/io/reactivex/rxjava3/internal/operators/observable/BlockingObservableNextTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,8 @@ public void nextWithCallingHasNextMultipleTimes() {
227227

228228
/**
229229
* Confirm that no buffering or blocking of the Observable onNext calls occurs and it just grabs the next emitted value.
230-
* <p/>
231-
* This results in output such as => a: 1 b: 2 c: 89
230+
* <p>
231+
* This results in output such as {@code => a: 1 b: 2 c: 89}
232232
*
233233
* @throws Throwable some method call is declared throws
234234
*/

src/test/java/io/reactivex/rxjava3/observers/SerializedObserverTest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,11 +340,11 @@ public void onNext(String t) {
340340
*
341341
* When using SynchronizedSubscriber we get this output:
342342
*
343-
* p1: 18 p2: 68 => should be close to each other unless we have thread starvation
343+
* {@code p1: 18 p2: 68 =>} should be close to each other unless we have thread starvation
344344
*
345345
* When using SerializedObserver we get:
346346
*
347-
* p1: 1 p2: 2445261 => should be close to each other unless we have thread starvation
347+
* {@code p1: 1 p2: 2445261 =>} should be close to each other unless we have thread starvation
348348
*
349349
* This demonstrates how SynchronizedSubscriber balances back and forth better, and blocks emission.
350350
* The real issue in this example is the async buffer-bloat, so we need backpressure.
@@ -1042,8 +1042,7 @@ public void run() {
10421042
}
10431043
};
10441044

1045-
TestHelper.race(r1, r2);
1046-
1045+
TestHelper.race(r1, r2);
10471046
to.awaitDone(5, TimeUnit.SECONDS)
10481047
.assertError(ex)
10491048
.assertNotComplete();

src/test/java/io/reactivex/rxjava3/subscribers/SerializedSubscriberTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,11 +341,11 @@ public void onNext(String t) {
341341
*
342342
* When using SynchronizedSubscriber we get this output:
343343
*
344-
* p1: 18 p2: 68 => should be close to each other unless we have thread starvation
344+
* {@code p1: 18 p2: 68 =>} should be close to each other unless we have thread starvation
345345
*
346346
* When using SerializedSubscriber we get:
347347
*
348-
* p1: 1 p2: 2445261 => should be close to each other unless we have thread starvation
348+
* {@code p1: 1 p2: 2445261 =>} should be close to each other unless we have thread starvation
349349
*
350350
* This demonstrates how SynchronizedSubscriber balances back and forth better, and blocks emission.
351351
* The real issue in this example is the async buffer-bloat, so we need backpressure.

src/test/java/io/reactivex/rxjava3/tck/BaseTck.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public long maxElementsFromPublisher() {
5151

5252
/**
5353
* Creates an Iterable with the specified number of elements or an infinite one if
54-
* elements > {@link Integer#MAX_VALUE}.
54+
* {@code elements >} {@link Integer#MAX_VALUE}.
5555
* @param elements the number of elements to return, {@link Integer#MAX_VALUE} means an infinite sequence
5656
* @return the Iterable
5757
*/

0 commit comments

Comments
 (0)