Skip to content

Commit dc94f56

Browse files
authored
2.x: Maybe/Single Javadoc; annotation cleanup (#5977)
1 parent 5b929c4 commit dc94f56

File tree

6 files changed

+27
-31
lines changed

6 files changed

+27
-31
lines changed

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

+19-19
Original file line numberDiff line numberDiff line change
@@ -3503,7 +3503,7 @@ public final Maybe<T> onErrorComplete(final Predicate<? super Throwable> predica
35033503
}
35043504

35053505
/**
3506-
* Instructs a Maybe to pass control to another MaybeSource rather than invoking
3506+
* Instructs a Maybe to pass control to another {@link MaybeSource} rather than invoking
35073507
* {@link MaybeObserver#onError onError} if it encounters an error.
35083508
* <p>
35093509
* <img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/onErrorResumeNext.png" alt="">
@@ -3516,7 +3516,7 @@ public final Maybe<T> onErrorComplete(final Predicate<? super Throwable> predica
35163516
* </dl>
35173517
*
35183518
* @param next
3519-
* the next Maybe source that will take over if the source Maybe encounters
3519+
* the next {@code MaybeSource} that will take over if the source Maybe encounters
35203520
* an error
35213521
* @return the new Maybe instance
35223522
* @see <a href="http://reactivex.io/documentation/operators/catch.html">ReactiveX operators documentation: Catch</a>
@@ -4348,14 +4348,14 @@ public final Maybe<T> timeout(long timeout, TimeUnit timeUnit, Scheduler schedul
43484348
}
43494349

43504350
/**
4351-
* If this Maybe source didn't signal an event before the timeoutIndicator MaybeSource signals, a
4352-
* TimeoutException is signalled instead.
4351+
* If the current {@code Maybe} didn't signal an event before the {@code timeoutIndicator} {@link MaybeSource} signals, a
4352+
* {@link TimeoutException} is signaled instead.
43534353
* <dl>
43544354
* <dt><b>Scheduler:</b></dt>
43554355
* <dd>{@code timeout} does not operate by default on a particular {@link Scheduler}.</dd>
43564356
* </dl>
43574357
* @param <U> the value type of the
4358-
* @param timeoutIndicator the MaybeSource that indicates the timeout by signalling onSuccess
4358+
* @param timeoutIndicator the {@code MaybeSource} that indicates the timeout by signaling onSuccess
43594359
* or onComplete.
43604360
* @return the new Maybe instance
43614361
*/
@@ -4367,17 +4367,17 @@ public final <U> Maybe<T> timeout(MaybeSource<U> timeoutIndicator) {
43674367
}
43684368

43694369
/**
4370-
* If the current Maybe source didn't signal an event before the timeoutIndicator MaybeSource signals,
4371-
* the current Maybe is cancelled and the {@code fallback} MaybeSource subscribed to
4370+
* If the current {@code Maybe} didn't signal an event before the {@code timeoutIndicator} {@link MaybeSource} signals,
4371+
* the current {@code Maybe} is cancelled and the {@code fallback} {@code MaybeSource} subscribed to
43724372
* as a continuation.
43734373
* <dl>
43744374
* <dt><b>Scheduler:</b></dt>
43754375
* <dd>{@code timeout} does not operate by default on a particular {@link Scheduler}.</dd>
43764376
* </dl>
43774377
* @param <U> the value type of the
4378-
* @param timeoutIndicator the MaybeSource that indicates the timeout by signalling onSuccess
4379-
* or onComplete.
4380-
* @param fallback the MaybeSource that is subscribed to if the current Maybe times out
4378+
* @param timeoutIndicator the {@code MaybeSource} that indicates the timeout by signaling {@code onSuccess}
4379+
* or {@code onComplete}.
4380+
* @param fallback the {@code MaybeSource} that is subscribed to if the current {@code Maybe} times out
43814381
* @return the new Maybe instance
43824382
*/
43834383
@CheckReturnValue
@@ -4389,8 +4389,8 @@ public final <U> Maybe<T> timeout(MaybeSource<U> timeoutIndicator, MaybeSource<?
43894389
}
43904390

43914391
/**
4392-
* If this Maybe source didn't signal an event before the timeoutIndicator Publisher signals, a
4393-
* TimeoutException is signalled instead.
4392+
* If the current {@code Maybe} source didn't signal an event before the {@code timeoutIndicator} {@link Publisher} signals, a
4393+
* {@link TimeoutException} is signaled instead.
43944394
* <dl>
43954395
* <dt><b>Backpressure:</b></dt>
43964396
* <dd>The {@code timeoutIndicator} {@link Publisher} is consumed in an unbounded manner and
@@ -4399,8 +4399,8 @@ public final <U> Maybe<T> timeout(MaybeSource<U> timeoutIndicator, MaybeSource<?
43994399
* <dd>{@code timeout} does not operate by default on a particular {@link Scheduler}.</dd>
44004400
* </dl>
44014401
* @param <U> the value type of the
4402-
* @param timeoutIndicator the MaybeSource that indicates the timeout by signalling onSuccess
4403-
* or onComplete.
4402+
* @param timeoutIndicator the {@code MaybeSource} that indicates the timeout by signaling {@code onSuccess}
4403+
* or {@code onComplete}.
44044404
* @return the new Maybe instance
44054405
*/
44064406
@BackpressureSupport(BackpressureKind.UNBOUNDED_IN)
@@ -4412,8 +4412,8 @@ public final <U> Maybe<T> timeout(Publisher<U> timeoutIndicator) {
44124412
}
44134413

44144414
/**
4415-
* If the current Maybe source didn't signal an event before the timeoutIndicator Publisher signals,
4416-
* the current Maybe is cancelled and the {@code fallback} MaybeSource subscribed to
4415+
* If the current {@code Maybe} didn't signal an event before the {@code timeoutIndicator} {@link Publisher} signals,
4416+
* the current {@code Maybe} is cancelled and the {@code fallback} {@code MaybeSource} subscribed to
44174417
* as a continuation.
44184418
* <dl>
44194419
* <dt><b>Backpressure:</b></dt>
@@ -4423,9 +4423,9 @@ public final <U> Maybe<T> timeout(Publisher<U> timeoutIndicator) {
44234423
* <dd>{@code timeout} does not operate by default on a particular {@link Scheduler}.</dd>
44244424
* </dl>
44254425
* @param <U> the value type of the
4426-
* @param timeoutIndicator the MaybeSource that indicates the timeout by signalling onSuccess
4427-
* or onComplete
4428-
* @param fallback the MaybeSource that is subscribed to if the current Maybe times out
4426+
* @param timeoutIndicator the {@code MaybeSource} that indicates the timeout by signaling {@code onSuccess}
4427+
* or {@code onComplete}
4428+
* @param fallback the {@code MaybeSource} that is subscribed to if the current {@code Maybe} times out
44294429
* @return the new Maybe instance
44304430
*/
44314431
@BackpressureSupport(BackpressureKind.UNBOUNDED_IN)

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

+2-5
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,6 @@ public static <T> Flowable<T> concatArray(SingleSource<? extends T>... sources)
336336
* @param sources a sequence of Single that need to be eagerly concatenated
337337
* @return the new Flowable instance with the specified concatenation behavior
338338
*/
339-
@SuppressWarnings({ "rawtypes", "unchecked" })
340339
@BackpressureSupport(BackpressureKind.FULL)
341340
@CheckReturnValue
342341
@SchedulerSupport(SchedulerSupport.NONE)
@@ -362,7 +361,6 @@ public static <T> Flowable<T> concatArrayEager(SingleSource<? extends T>... sour
362361
* @param sources a sequence of Publishers that need to be eagerly concatenated
363362
* @return the new Publisher instance with the specified concatenation behavior
364363
*/
365-
@SuppressWarnings({ "rawtypes", "unchecked" })
366364
@BackpressureSupport(BackpressureKind.FULL)
367365
@CheckReturnValue
368366
@SchedulerSupport(SchedulerSupport.NONE)
@@ -386,7 +384,6 @@ public static <T> Flowable<T> concatEager(Publisher<? extends SingleSource<? ext
386384
* @param sources a sequence of SingleSource that need to be eagerly concatenated
387385
* @return the new Flowable instance with the specified concatenation behavior
388386
*/
389-
@SuppressWarnings({ "rawtypes", "unchecked" })
390387
@BackpressureSupport(BackpressureKind.FULL)
391388
@CheckReturnValue
392389
@SchedulerSupport(SchedulerSupport.NONE)
@@ -436,14 +433,14 @@ public static <T> Single<T> create(SingleOnSubscribe<T> source) {
436433
}
437434

438435
/**
439-
* Calls a Callable for each individual SingleObserver to return the actual Single source to
436+
* Calls a {@link Callable} for each individual {@link SingleObserver} to return the actual {@link SingleSource} to
440437
* be subscribed to.
441438
* <dl>
442439
* <dt><b>Scheduler:</b></dt>
443440
* <dd>{@code defer} does not operate by default on a particular {@link Scheduler}.</dd>
444441
* </dl>
445442
* @param <T> the value type
446-
* @param singleSupplier the Callable that is called for each individual SingleObserver and
443+
* @param singleSupplier the {@code Callable} that is called for each individual {@code SingleObserver} and
447444
* returns a SingleSource instance to subscribe to
448445
* @return the new Single instance
449446
*/

src/test/java/io/reactivex/JavadocWording.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -866,12 +866,12 @@ static void aOrAn(StringBuilder e, RxMethod m, String wrongPre, String word, Str
866866
break;
867867
}
868868
}
869-
869+
870870
// remove linebreaks and multi-spaces
871871
String javadoc2 = m.javadoc.replace("\n", " ").replace("\r", " ")
872872
.replace(" * ", " ")
873873
.replaceAll("\\s+", " ");
874-
874+
875875
// strip {@xxx } tags
876876
int kk = 0;
877877
for (;;) {
@@ -881,12 +881,12 @@ static void aOrAn(StringBuilder e, RxMethod m, String wrongPre, String word, Str
881881
}
882882
int nn = javadoc2.indexOf(" ", jj + 2);
883883
int mm = javadoc2.indexOf("}", jj + 2);
884-
884+
885885
javadoc2 = javadoc2.substring(0, jj) + javadoc2.substring(nn + 1, mm) + javadoc2.substring(mm + 1);
886886

887887
kk = mm + 1;
888888
}
889-
889+
890890
jdx = 0;
891891
for (;;) {
892892
idx = javadoc2.indexOf(wrongPre + " " + word, jdx);

src/test/java/io/reactivex/internal/operators/mixed/ObservableConcatMapMaybeTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ public void cancelNoConcurrentClean() {
403403
@Test
404404
public void checkUnboundedInnerQueue() {
405405
MaybeSubject<Integer> ms = MaybeSubject.create();
406-
406+
407407
@SuppressWarnings("unchecked")
408408
TestObserver<Integer> to = Observable
409409
.fromArray(ms, Maybe.just(2), Maybe.just(3), Maybe.just(4))

src/test/java/io/reactivex/internal/operators/mixed/ObservableConcatMapSingleTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ public void cancelNoConcurrentClean() {
340340
@Test
341341
public void checkUnboundedInnerQueue() {
342342
SingleSubject<Integer> ss = SingleSubject.create();
343-
343+
344344
@SuppressWarnings("unchecked")
345345
TestObserver<Integer> to = Observable
346346
.fromArray(ss, Single.just(2), Single.just(3), Single.just(4))

src/test/java/io/reactivex/internal/operators/single/SingleConcatTest.java

-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ public void concatEagerIterableTest() {
108108
ts.assertComplete();
109109
}
110110

111-
@SuppressWarnings("unchecked")
112111
@Test
113112
public void concatEagerPublisherTest() {
114113
PublishProcessor<String> pp1 = PublishProcessor.create();

0 commit comments

Comments
 (0)