Skip to content

Commit 19fac95

Browse files
committed
2.x: fix minor javadoc errors
1 parent b21aa20 commit 19fac95

21 files changed

+32
-26
lines changed

src/main/java/io/reactivex/internal/observers/QueueDrainObserver.java

+1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ protected final void fastPathEmit(U value, boolean delayError, Disposable dispos
8383
* Makes sure the fast-path emits in order.
8484
* @param value the value to emit or queue up
8585
* @param delayError if true, errors are delayed until the source has terminated
86+
* @param disposable the resource to dispose if the drain terminates
8687
*/
8788
protected final void fastPathOrderedEmit(U value, boolean delayError, Disposable disposable) {
8889
final Observer<? super V> s = actual;

src/main/java/io/reactivex/internal/operators/maybe/MaybeFlatMapCompletable.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
/**
2626
* Maps the success value of the source MaybeSource into a Completable.
27-
* @param <T>
27+
* @param <T> the value type of the source MaybeSource
2828
*/
2929
public final class MaybeFlatMapCompletable<T> extends Completable {
3030

src/main/java/io/reactivex/internal/operators/single/SingleFlatMapCompletable.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
/**
2626
* Maps the success value of the source SingleSource into a Completable.
27-
* @param <T>
27+
* @param <T> the value type of the source SingleSource
2828
*/
2929
public final class SingleFlatMapCompletable<T> extends Completable {
3030

src/main/java/io/reactivex/internal/queue/SpscArrayQueue.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* 2012 - Junchang- BQueue- Efficient and Practical Queuing.pdf <br>
3636
* </i> This implementation is wait free.
3737
*
38-
* @param <E>
38+
* @param <E> the element type of the queue
3939
*/
4040
public final class SpscArrayQueue<E> extends AtomicReferenceArray<E> implements SimplePlainQueue<E> {
4141
private static final long serialVersionUID = -1296597691183856449L;

src/main/java/io/reactivex/observers/BaseTestConsumer.java

+1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ public final int errorCount() {
117117
* will capture those potential errors and report it along with the original failure.
118118
*
119119
* @param message the message to use
120+
* @return AssertionError the prepared AssertionError instance
120121
*/
121122
protected final AssertionError fail(String message) {
122123
StringBuilder b = new StringBuilder(64 + message.length());

src/main/java/io/reactivex/subscribers/DefaultSubscriber.java

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public final void onSubscribe(Subscription s) {
3737

3838
/**
3939
* Requests from the upstream Subscription.
40+
* @param n the request amount, positive
4041
*/
4142
protected final void request(long n) {
4243
Subscription s = this.s;

src/test/java/io/reactivex/flowable/FlowableEventStream.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,9 @@ public static class Event {
6666
public final Map<String, Object> values;
6767

6868
/**
69-
* @param type
70-
* @param instanceId
69+
* Construct an event with the provided parameters.
70+
* @param type the event type
71+
* @param instanceId the instance identifier
7172
* @param values
7273
* This does NOT deep-copy, so do not mutate this Map after passing it in.
7374
*/

src/test/java/io/reactivex/flowable/FlowableTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ public void testErrorThrownWithoutErrorHandlerSynchronous() {
699699
* to rethrow the exception on the thread that the message comes out from the Observable.
700700
* The OnCompleted behavior in this case is to do nothing."
701701
*
702-
* @throws InterruptedException
702+
* @throws InterruptedException if the await is interrupted
703703
*/
704704
@Test
705705
@Ignore("Subscribers can't throw")

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public void testNextWithCallingHasNextMultipleTimes() {
224224
* <p/>
225225
* This results in output such as => a: 1 b: 2 c: 89
226226
*
227-
* @throws Throwable
227+
* @throws Throwable some method call is declared throws
228228
*/
229229
@Test
230230
public void testNoBufferingOrBlockingOfSequence() throws Throwable {

src/test/java/io/reactivex/internal/operators/flowable/FlowableGroupByTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public void accept(V v) {
171171
/**
172172
* Assert that only a single subscription to a stream occurs and that all events are received.
173173
*
174-
* @throws Throwable
174+
* @throws Throwable some method call is declared throws
175175
*/
176176
@Test
177177
public void testGroupedEventStream() throws Throwable {

src/test/java/io/reactivex/internal/operators/flowable/FlowableMergeTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ public void onNext(Integer t) {
836836
* Thus, we must allow all Flowables to be sent. The ScalarSynchronousFlowable use case is an exception to this since
837837
* we can grab the value synchronously.
838838
*
839-
* @throws InterruptedException
839+
* @throws InterruptedException if the await is interrupted
840840
*/
841841
@Test(timeout = 5000)
842842
public void testBackpressureBothUpstreamAndDownstreamWithRegularFlowables() throws InterruptedException {

src/test/java/io/reactivex/internal/operators/flowable/FlowableReplayTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ public void testIssue2191_UnsubscribeSource() throws Exception {
557557
/**
558558
* Specifically test interaction with a Scheduler with subscribeOn.
559559
*
560-
* @throws Exception
560+
* @throws Exception functional interfaces declare throws Exception
561561
*/
562562
@SuppressWarnings("unchecked")
563563
@Test
@@ -619,7 +619,7 @@ public void testIssue2191_SchedulerUnsubscribe() throws Exception {
619619
/**
620620
* Specifically test interaction with a Scheduler with subscribeOn.
621621
*
622-
* @throws Exception
622+
* @throws Exception functional interfaces declare throws Exception
623623
*/
624624
@SuppressWarnings("unchecked")
625625
@Test

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ public void testNextWithCallingHasNextMultipleTimes() {
230230
* <p/>
231231
* This results in output such as => a: 1 b: 2 c: 89
232232
*
233-
* @throws Throwable
233+
* @throws Throwable some method call is declared throws
234234
*/
235235
@Test
236236
public void testNoBufferingOrBlockingOfSequence() throws Throwable {

src/test/java/io/reactivex/internal/operators/observable/ObservableGroupByTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public void accept(V v) {
171171
/**
172172
* Assert that only a single subscription to a stream occurs and that all events are received.
173173
*
174-
* @throws Throwable
174+
* @throws Throwable some method may throw
175175
*/
176176
@Test
177177
public void testGroupedEventStream() throws Throwable {

src/test/java/io/reactivex/internal/operators/observable/ObservableMergeTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ public void onNext(Integer t) {
772772
* Thus, we must allow all Observables to be sent. The ScalarSynchronousObservable use case is an exception to this since
773773
* we can grab the value synchronously.
774774
*
775-
* @throws InterruptedException
775+
* @throws InterruptedException if the await is interrupted
776776
*/
777777
@Test(timeout = 5000)
778778
public void testBackpressureBothUpstreamAndDownstreamWithRegularObservables() throws InterruptedException {

src/test/java/io/reactivex/internal/operators/observable/ObservableReplayTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ public void testIssue2191_UnsubscribeSource() throws Exception {
557557
/**
558558
* Specifically test interaction with a Scheduler with subscribeOn.
559559
*
560-
* @throws Exception
560+
* @throws Exception functional interfaces are declared with throws Exception
561561
*/
562562
@SuppressWarnings("unchecked")
563563
@Test
@@ -610,7 +610,7 @@ public void testIssue2191_SchedulerUnsubscribe() throws Exception {
610610
/**
611611
* Specifically test interaction with a Scheduler with subscribeOn.
612612
*
613-
* @throws Exception
613+
* @throws Exception functional interfaces are declared with throws Exception
614614
*/
615615
@SuppressWarnings("unchecked")
616616
@Test

src/test/java/io/reactivex/observable/ObservableEventStream.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@ public static class Event {
6767
public final Map<String, Object> values;
6868

6969
/**
70-
* @param type
71-
* @param instanceId
70+
* Construct an event with the provided parameters.
71+
* @param type the event type
72+
* @param instanceId the instance identifier
7273
* @param values
7374
* This does NOT deep-copy, so do not mutate this Map after passing it in.
7475
*/

src/test/java/io/reactivex/observable/ObservableTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ public void testErrorThrownWithoutErrorHandlerSynchronous() {
719719
* to rethrow the exception on the thread that the message comes out from the Observable.
720720
* The OnCompleted behavior in this case is to do nothing."
721721
*
722-
* @throws InterruptedException
722+
* @throws InterruptedException if the await is interrupted
723723
*/
724724
@Test
725725
@Ignore("Subscribers can't throw")

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ public void runConcurrencyTest() {
250250
/**
251251
* Test that a notification does not get delayed in the queue waiting for the next event to push it through.
252252
*
253-
* @throws InterruptedException
253+
* @throws InterruptedException if the await is interrupted
254254
*/
255255
@Ignore("this is non-deterministic ... haven't figured out what's wrong with the test yet (benjchristensen: July 2014)")
256256
@Test
@@ -340,7 +340,7 @@ public void onNext(String t) {
340340
* The real issue in this example is the async buffer-bloat, so we need backpressure.
341341
*
342342
*
343-
* @throws InterruptedException
343+
* @throws InterruptedException if the await is interrupted
344344
*/
345345
@Ignore("Demonstrates thread starvation problem. Read JavaDoc")
346346
@Test
@@ -585,7 +585,7 @@ public void onNext(String args) {
585585
/**
586586
* Assert the order of events is correct and return the number of onNext executions.
587587
*
588-
* @param expectedEndingEvent
588+
* @param expectedEndingEvent the expected last event
589589
* @return int count of onNext calls
590590
* @throws IllegalStateException
591591
* If order of events was invalid.

src/test/java/io/reactivex/schedulers/AbstractSchedulerTests.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public abstract class AbstractSchedulerTests {
4040

4141
/**
4242
* The scheduler to test.
43+
* @return the Scheduler instance
4344
*/
4445
protected abstract Scheduler getScheduler();
4546

@@ -136,7 +137,7 @@ public String apply(String s) {
136137
/**
137138
* The order of execution is nondeterministic.
138139
*
139-
* @throws InterruptedException
140+
* @throws InterruptedException if the await is interrupted
140141
*/
141142
@SuppressWarnings("rawtypes")
142143
@Test

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ public void runConcurrencyTest() {
251251
/**
252252
* Test that a notification does not get delayed in the queue waiting for the next event to push it through.
253253
*
254-
* @throws InterruptedException
254+
* @throws InterruptedException if the await is interrupted
255255
*/
256256
@Ignore("this is non-deterministic ... haven't figured out what's wrong with the test yet (benjchristensen: July 2014)")
257257
@Test
@@ -341,7 +341,7 @@ public void onNext(String t) {
341341
* The real issue in this example is the async buffer-bloat, so we need backpressure.
342342
*
343343
*
344-
* @throws InterruptedException
344+
* @throws InterruptedException if the await is interrupted
345345
*/
346346
@Ignore("Demonstrates thread starvation problem. Read JavaDoc")
347347
@Test
@@ -586,7 +586,7 @@ public void onNext(String args) {
586586
/**
587587
* Assert the order of events is correct and return the number of onNext executions.
588588
*
589-
* @param expectedEndingEvent
589+
* @param expectedEndingEvent the last event
590590
* @return int count of onNext calls
591591
* @throws IllegalStateException
592592
* If order of events was invalid.

0 commit comments

Comments
 (0)