Skip to content

Commit 3481424

Browse files
authored
2.x: blockingX JavaDoc to mention wrapping of checked Exc (ReactiveX#5951)
1 parent 54c281a commit 3481424

File tree

5 files changed

+68
-0
lines changed

5 files changed

+68
-0
lines changed

src/main/java/io/reactivex/Completable.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -989,6 +989,10 @@ public final <R> R as(@NonNull CompletableConverter<? extends R> converter) {
989989
* <dl>
990990
* <dt><b>Scheduler:</b></dt>
991991
* <dd>{@code blockingAwait} does not operate by default on a particular {@link Scheduler}.</dd>
992+
* <dt><b>Error handling:</b></dt>
993+
* <dd>If the source signals an error, the operator wraps a checked {@link Exception}
994+
* into {@link RuntimeException} and throws that. Otherwise, {@code RuntimeException}s and
995+
* {@link Error}s are rethrown as they are.</dd>
992996
* </dl>
993997
* @throws RuntimeException wrapping an InterruptedException if the current thread is interrupted
994998
*/
@@ -1005,6 +1009,10 @@ public final void blockingAwait() {
10051009
* <dl>
10061010
* <dt><b>Scheduler:</b></dt>
10071011
* <dd>{@code blockingAwait} does not operate by default on a particular {@link Scheduler}.</dd>
1012+
* <dt><b>Error handling:</b></dt>
1013+
* <dd>If the source signals an error, the operator wraps a checked {@link Exception}
1014+
* into {@link RuntimeException} and throws that. Otherwise, {@code RuntimeException}s and
1015+
* {@link Error}s are rethrown as they are.</dd>
10081016
* </dl>
10091017
* @param timeout the timeout value
10101018
* @param unit the timeout unit

src/main/java/io/reactivex/Flowable.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5416,6 +5416,10 @@ public final <R> R as(@NonNull FlowableConverter<T, ? extends R> converter) {
54165416
* (i.e., no backpressure applied to it).</dd>
54175417
* <dt><b>Scheduler:</b></dt>
54185418
* <dd>{@code blockingFirst} does not operate by default on a particular {@link Scheduler}.</dd>
5419+
* <dt><b>Error handling:</b></dt>
5420+
* <dd>If the source signals an error, the operator wraps a checked {@link Exception}
5421+
* into {@link RuntimeException} and throws that. Otherwise, {@code RuntimeException}s and
5422+
* {@link Error}s are rethrown as they are.</dd>
54195423
* </dl>
54205424
*
54215425
* @return the first item emitted by this {@code Flowable}
@@ -5445,6 +5449,10 @@ public final T blockingFirst() {
54455449
* (i.e., no backpressure applied to it).</dd>
54465450
* <dt><b>Scheduler:</b></dt>
54475451
* <dd>{@code blockingFirst} does not operate by default on a particular {@link Scheduler}.</dd>
5452+
* <dt><b>Error handling:</b></dt>
5453+
* <dd>If the source signals an error, the operator wraps a checked {@link Exception}
5454+
* into {@link RuntimeException} and throws that. Otherwise, {@code RuntimeException}s and
5455+
* {@link Error}s are rethrown as they are.</dd>
54485456
* </dl>
54495457
*
54505458
* @param defaultItem
@@ -5484,6 +5492,10 @@ public final T blockingFirst(T defaultItem) {
54845492
* (i.e., no backpressure applied to it).</dd>
54855493
* <dt><b>Scheduler:</b></dt>
54865494
* <dd>{@code blockingForEach} does not operate by default on a particular {@link Scheduler}.</dd>
5495+
* <dt><b>Error handling:</b></dt>
5496+
* <dd>If the source signals an error, the operator wraps a checked {@link Exception}
5497+
* into {@link RuntimeException} and throws that. Otherwise, {@code RuntimeException}s and
5498+
* {@link Error}s are rethrown as they are.</dd>
54875499
* </dl>
54885500
*
54895501
* @param onNext
@@ -5566,6 +5578,10 @@ public final Iterable<T> blockingIterable(int bufferSize) {
55665578
* (i.e., no backpressure applied to it).</dd>
55675579
* <dt><b>Scheduler:</b></dt>
55685580
* <dd>{@code blockingLast} does not operate by default on a particular {@link Scheduler}.</dd>
5581+
* <dt><b>Error handling:</b></dt>
5582+
* <dd>If the source signals an error, the operator wraps a checked {@link Exception}
5583+
* into {@link RuntimeException} and throws that. Otherwise, {@code RuntimeException}s and
5584+
* {@link Error}s are rethrown as they are.</dd>
55695585
* </dl>
55705586
*
55715587
* @return the last item emitted by this {@code Flowable}
@@ -5597,6 +5613,10 @@ public final T blockingLast() {
55975613
* (i.e., no backpressure applied to it).</dd>
55985614
* <dt><b>Scheduler:</b></dt>
55995615
* <dd>{@code blockingLast} does not operate by default on a particular {@link Scheduler}.</dd>
5616+
* <dt><b>Error handling:</b></dt>
5617+
* <dd>If the source signals an error, the operator wraps a checked {@link Exception}
5618+
* into {@link RuntimeException} and throws that. Otherwise, {@code RuntimeException}s and
5619+
* {@link Error}s are rethrown as they are.</dd>
56005620
* </dl>
56015621
*
56025622
* @param defaultItem
@@ -5704,6 +5724,10 @@ public final Iterable<T> blockingNext() {
57045724
* (i.e., no backpressure applied to it).</dd>
57055725
* <dt><b>Scheduler:</b></dt>
57065726
* <dd>{@code blockingSingle} does not operate by default on a particular {@link Scheduler}.</dd>
5727+
* <dt><b>Error handling:</b></dt>
5728+
* <dd>If the source signals an error, the operator wraps a checked {@link Exception}
5729+
* into {@link RuntimeException} and throws that. Otherwise, {@code RuntimeException}s and
5730+
* {@link Error}s are rethrown as they are.</dd>
57075731
* </dl>
57085732
*
57095733
* @return the single item emitted by this {@code Flowable}
@@ -5728,6 +5752,10 @@ public final T blockingSingle() {
57285752
* (i.e., no backpressure applied to it).</dd>
57295753
* <dt><b>Scheduler:</b></dt>
57305754
* <dd>{@code blockingSingle} does not operate by default on a particular {@link Scheduler}.</dd>
5755+
* <dt><b>Error handling:</b></dt>
5756+
* <dd>If the source signals an error, the operator wraps a checked {@link Exception}
5757+
* into {@link RuntimeException} and throws that. Otherwise, {@code RuntimeException}s and
5758+
* {@link Error}s are rethrown as they are.</dd>
57315759
* </dl>
57325760
*
57335761
* @param defaultItem

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2180,6 +2180,10 @@ public final <R> R as(@NonNull MaybeConverter<T, ? extends R> converter) {
21802180
* <dl>
21812181
* <dt><b>Scheduler:</b></dt>
21822182
* <dd>{@code blockingGet} does not operate by default on a particular {@link Scheduler}.</dd>
2183+
* <dt><b>Error handling:</b></dt>
2184+
* <dd>If the source signals an error, the operator wraps a checked {@link Exception}
2185+
* into {@link RuntimeException} and throws that. Otherwise, {@code RuntimeException}s and
2186+
* {@link Error}s are rethrown as they are.</dd>
21832187
* </dl>
21842188
* @return the success value
21852189
*/
@@ -2197,6 +2201,10 @@ public final T blockingGet() {
21972201
* <dl>
21982202
* <dt><b>Scheduler:</b></dt>
21992203
* <dd>{@code blockingGet} does not operate by default on a particular {@link Scheduler}.</dd>
2204+
* <dt><b>Error handling:</b></dt>
2205+
* <dd>If the source signals an error, the operator wraps a checked {@link Exception}
2206+
* into {@link RuntimeException} and throws that. Otherwise, {@code RuntimeException}s and
2207+
* {@link Error}s are rethrown as they are.</dd>
22002208
* </dl>
22012209
* @param defaultValue the default item to return if this Maybe is empty
22022210
* @return the success value

src/main/java/io/reactivex/Observable.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5039,6 +5039,10 @@ public final T blockingFirst(T defaultItem) {
50395039
* <dl>
50405040
* <dt><b>Scheduler:</b></dt>
50415041
* <dd>{@code blockingForEach} does not operate by default on a particular {@link Scheduler}.</dd>
5042+
* <dt><b>Error handling:</b></dt>
5043+
* <dd>If the source signals an error, the operator wraps a checked {@link Exception}
5044+
* into {@link RuntimeException} and throws that. Otherwise, {@code RuntimeException}s and
5045+
* {@link Error}s are rethrown as they are.</dd>
50425046
* </dl>
50435047
*
50445048
* @param onNext
@@ -5108,6 +5112,10 @@ public final Iterable<T> blockingIterable(int bufferSize) {
51085112
* <dl>
51095113
* <dt><b>Scheduler:</b></dt>
51105114
* <dd>{@code blockingLast} does not operate by default on a particular {@link Scheduler}.</dd>
5115+
* <dt><b>Error handling:</b></dt>
5116+
* <dd>If the source signals an error, the operator wraps a checked {@link Exception}
5117+
* into {@link RuntimeException} and throws that. Otherwise, {@code RuntimeException}s and
5118+
* {@link Error}s are rethrown as they are.</dd>
51115119
* </dl>
51125120
*
51135121
* @return the last item emitted by this {@code Observable}
@@ -5135,6 +5143,10 @@ public final T blockingLast() {
51355143
* <dl>
51365144
* <dt><b>Scheduler:</b></dt>
51375145
* <dd>{@code blockingLast} does not operate by default on a particular {@link Scheduler}.</dd>
5146+
* <dt><b>Error handling:</b></dt>
5147+
* <dd>If the source signals an error, the operator wraps a checked {@link Exception}
5148+
* into {@link RuntimeException} and throws that. Otherwise, {@code RuntimeException}s and
5149+
* {@link Error}s are rethrown as they are.</dd>
51385150
* </dl>
51395151
*
51405152
* @param defaultItem
@@ -5228,6 +5240,10 @@ public final Iterable<T> blockingNext() {
52285240
* <dl>
52295241
* <dt><b>Scheduler:</b></dt>
52305242
* <dd>{@code blockingSingle} does not operate by default on a particular {@link Scheduler}.</dd>
5243+
* <dt><b>Error handling:</b></dt>
5244+
* <dd>If the source signals an error, the operator wraps a checked {@link Exception}
5245+
* into {@link RuntimeException} and throws that. Otherwise, {@code RuntimeException}s and
5246+
* {@link Error}s are rethrown as they are.</dd>
52315247
* </dl>
52325248
*
52335249
* @return the single item emitted by this {@code Observable}
@@ -5252,6 +5268,10 @@ public final T blockingSingle() {
52525268
* <dl>
52535269
* <dt><b>Scheduler:</b></dt>
52545270
* <dd>{@code blockingSingle} does not operate by default on a particular {@link Scheduler}.</dd>
5271+
* <dt><b>Error handling:</b></dt>
5272+
* <dd>If the source signals an error, the operator wraps a checked {@link Exception}
5273+
* into {@link RuntimeException} and throws that. Otherwise, {@code RuntimeException}s and
5274+
* {@link Error}s are rethrown as they are.</dd>
52555275
* </dl>
52565276
*
52575277
* @param defaultItem

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2481,6 +2481,10 @@ public final Completable flatMapCompletable(final Function<? super T, ? extends
24812481
* <dl>
24822482
* <dt><b>Scheduler:</b></dt>
24832483
* <dd>{@code blockingGet} does not operate by default on a particular {@link Scheduler}.</dd>
2484+
* <dt><b>Error handling:</b></dt>
2485+
* <dd>If the source signals an error, the operator wraps a checked {@link Exception}
2486+
* into {@link RuntimeException} and throws that. Otherwise, {@code RuntimeException}s and
2487+
* {@link Error}s are rethrown as they are.</dd>
24842488
* </dl>
24852489
* @return the success value
24862490
*/

0 commit comments

Comments
 (0)