Skip to content

Commit 4ed9c51

Browse files
Srokaakarnokd
authored andcommitted
2.x: Add empty source clauses to javadocs of combineLatest operators accepting unspecified number of sources. This commit resolves #5412 (#5413)
1 parent 5d6ac53 commit 4ed9c51

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed

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

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ public static int bufferSize() {
150150
* If any of the sources never produces an item but only terminates (normally or with an error), the
151151
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
152152
* If that input source is also synchronous, other sources after it will not be subscribed to.
153+
* <p>
154+
* If provided array of source Publishers is empty, the resulting sequence completes immediately without emitting
155+
* any items and without any calls to combiner function.
153156
*
154157
* <dl>
155158
* <dt><b>Backpressure:</b></dt>
@@ -191,6 +194,9 @@ public static <T, R> Flowable<R> combineLatest(Publisher<? extends T>[] sources,
191194
* If any of the sources never produces an item but only terminates (normally or with an error), the
192195
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
193196
* If that input source is also synchronous, other sources after it will not be subscribed to.
197+
* <p>
198+
* If there are no source Publishers provided, the resulting sequence completes immediately without emitting
199+
* any items and without any calls to combiner function.
194200
*
195201
* <dl>
196202
* <dt><b>Backpressure:</b></dt>
@@ -232,6 +238,9 @@ public static <T, R> Flowable<R> combineLatest(Function<? super Object[], ? exte
232238
* If any of the sources never produces an item but only terminates (normally or with an error), the
233239
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
234240
* If that input source is also synchronous, other sources after it will not be subscribed to.
241+
* <p>
242+
* If provided array of source Publishers is empty, the resulting sequence completes immediately without emitting
243+
* any items and without any calls to combiner function.
235244
*
236245
* <dl>
237246
* <dt><b>Backpressure:</b></dt>
@@ -281,6 +290,9 @@ public static <T, R> Flowable<R> combineLatest(Publisher<? extends T>[] sources,
281290
* If any of the sources never produces an item but only terminates (normally or with an error), the
282291
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
283292
* If that input source is also synchronous, other sources after it will not be subscribed to.
293+
* <p>
294+
* If provided iterable of source Publishers is empty, the resulting sequence completes immediately without emitting
295+
* any items and without any calls to combiner function.
284296
*
285297
* <dl>
286298
* <dt><b>Backpressure:</b></dt>
@@ -323,6 +335,9 @@ public static <T, R> Flowable<R> combineLatest(Iterable<? extends Publisher<? ex
323335
* If any of the sources never produces an item but only terminates (normally or with an error), the
324336
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
325337
* If that input source is also synchronous, other sources after it will not be subscribed to.
338+
* <p>
339+
* If provided iterable of source Publishers is empty, the resulting sequence completes immediately without emitting any items and
340+
* without any calls to combiner function.
326341
*
327342
* <dl>
328343
* <dt><b>Backpressure:</b></dt>
@@ -370,6 +385,9 @@ public static <T, R> Flowable<R> combineLatest(Iterable<? extends Publisher<? ex
370385
* If any of the sources never produces an item but only terminates (normally or with an error), the
371386
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
372387
* If that input source is also synchronous, other sources after it will not be subscribed to.
388+
* <p>
389+
* If provided array of source Publishers is empty, the resulting sequence completes immediately without emitting
390+
* any items and without any calls to combiner function.
373391
*
374392
* <dl>
375393
* <dt><b>Backpressure:</b></dt>
@@ -413,6 +431,9 @@ public static <T, R> Flowable<R> combineLatestDelayError(Publisher<? extends T>[
413431
* If any of the sources never produces an item but only terminates (normally or with an error), the
414432
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
415433
* If that input source is also synchronous, other sources after it will not be subscribed to.
434+
* <p>
435+
* If there are no source Publishers provided, the resulting sequence completes immediately without emitting
436+
* any items and without any calls to combiner function.
416437
*
417438
* <dl>
418439
* <dt><b>Backpressure:</b></dt>
@@ -456,6 +477,9 @@ public static <T, R> Flowable<R> combineLatestDelayError(Function<? super Object
456477
* If any of the sources never produces an item but only terminates (normally or with an error), the
457478
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
458479
* If that input source is also synchronous, other sources after it will not be subscribed to.
480+
* <p>
481+
* If there are no source Publishers provided, the resulting sequence completes immediately without emitting
482+
* any items and without any calls to combiner function.
459483
*
460484
* <dl>
461485
* <dt><b>Backpressure:</b></dt>
@@ -501,6 +525,9 @@ public static <T, R> Flowable<R> combineLatestDelayError(Function<? super Object
501525
* If any of the sources never produces an item but only terminates (normally or with an error), the
502526
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
503527
* If that input source is also synchronous, other sources after it will not be subscribed to.
528+
* <p>
529+
* If provided array of source Publishers is empty, the resulting sequence completes immediately without emitting
530+
* any items and without any calls to combiner function.
504531
*
505532
* <dl>
506533
* <dt><b>Backpressure:</b></dt>
@@ -552,6 +579,9 @@ public static <T, R> Flowable<R> combineLatestDelayError(Publisher<? extends T>[
552579
* If any of the sources never produces an item but only terminates (normally or with an error), the
553580
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
554581
* If that input source is also synchronous, other sources after it will not be subscribed to.
582+
* <p>
583+
* If provided iterable of source Publishers is empty, the resulting sequence completes immediately without emitting
584+
* any items and without any calls to combiner function.
555585
*
556586
* <dl>
557587
* <dt><b>Backpressure:</b></dt>
@@ -595,6 +625,9 @@ public static <T, R> Flowable<R> combineLatestDelayError(Iterable<? extends Publ
595625
* If any of the sources never produces an item but only terminates (normally or with an error), the
596626
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
597627
* If that input source is also synchronous, other sources after it will not be subscribed to.
628+
* <p>
629+
* If provided iterable of source Publishers is empty, the resulting sequence completes immediately without emitting
630+
* any items and without any calls to combiner function.
598631
*
599632
* <dl>
600633
* <dt><b>Backpressure:</b></dt>

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

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@ public static int bufferSize() {
178178
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
179179
* If that input source is also synchronous, other sources after it will not be subscribed to.
180180
* <p>
181+
* If there are no ObservableSources provided, the resulting sequence completes immediately without emitting
182+
* any items and without any calls to combiner function.
183+
*
184+
* <p>
181185
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/combineLatest.png" alt="">
182186
* <dl>
183187
* <dt><b>Scheduler:</b></dt>
@@ -217,6 +221,10 @@ public static <T, R> Observable<R> combineLatest(Function<? super Object[], ? ex
217221
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
218222
* If that input source is also synchronous, other sources after it will not be subscribed to.
219223
* <p>
224+
* If provided iterable of ObservableSources is empty, the resulting sequence completes immediately without emitting
225+
* any items and without any calls to combiner function.
226+
*
227+
* <p>
220228
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/combineLatest.png" alt="">
221229
* <dl>
222230
* <dt><b>Scheduler:</b></dt>
@@ -255,6 +263,10 @@ public static <T, R> Observable<R> combineLatest(Iterable<? extends ObservableSo
255263
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
256264
* If that input source is also synchronous, other sources after it will not be subscribed to.
257265
* <p>
266+
* If provided iterable of ObservableSources is empty, the resulting sequence completes immediately without emitting
267+
* any items and without any calls to combiner function.
268+
*
269+
* <p>
258270
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/combineLatest.png" alt="">
259271
* <dl>
260272
* <dt><b>Scheduler:</b></dt>
@@ -301,6 +313,10 @@ public static <T, R> Observable<R> combineLatest(Iterable<? extends ObservableSo
301313
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
302314
* If that input source is also synchronous, other sources after it will not be subscribed to.
303315
* <p>
316+
* If provided array of ObservableSources is empty, the resulting sequence completes immediately without emitting
317+
* any items and without any calls to combiner function.
318+
*
319+
* <p>
304320
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/combineLatest.png" alt="">
305321
* <dl>
306322
* <dt><b>Scheduler:</b></dt>
@@ -339,6 +355,10 @@ public static <T, R> Observable<R> combineLatest(ObservableSource<? extends T>[]
339355
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
340356
* If that input source is also synchronous, other sources after it will not be subscribed to.
341357
* <p>
358+
* If provided array of ObservableSources is empty, the resulting sequence completes immediately without emitting
359+
* any items and without any calls to combiner function.
360+
*
361+
* <p>
342362
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/combineLatest.png" alt="">
343363
* <dl>
344364
* <dt><b>Scheduler:</b></dt>
@@ -829,6 +849,9 @@ public static <T1, T2, T3, T4, T5, T6, T7, T8, T9, R> Observable<R> combineLates
829849
* If any of the sources never produces an item but only terminates (normally or with an error), the
830850
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
831851
* If that input source is also synchronous, other sources after it will not be subscribed to.
852+
* <p>
853+
* If provided array of ObservableSources is empty, the resulting sequence completes immediately without emitting
854+
* any items and without any calls to combiner function.
832855
*
833856
* <dl>
834857
* <dt><b>Scheduler:</b></dt>
@@ -869,6 +892,9 @@ public static <T, R> Observable<R> combineLatestDelayError(ObservableSource<? ex
869892
* If any of the sources never produces an item but only terminates (normally or with an error), the
870893
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
871894
* If that input source is also synchronous, other sources after it will not be subscribed to.
895+
* <p>
896+
* If there are no ObservableSources provided, the resulting sequence completes immediately without emitting
897+
* any items and without any calls to combiner function.
872898
*
873899
* <dl>
874900
* <dt><b>Scheduler:</b></dt>
@@ -910,6 +936,10 @@ public static <T, R> Observable<R> combineLatestDelayError(Function<? super Obje
910936
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
911937
* If that input source is also synchronous, other sources after it will not be subscribed to.
912938
* <p>
939+
* If provided array of ObservableSources is empty, the resulting sequence completes immediately without emitting
940+
* any items and without any calls to combiner function.
941+
*
942+
* <p>
913943
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/combineLatestDelayError.png" alt="">
914944
* <dl>
915945
* <dt><b>Scheduler:</b></dt>
@@ -958,6 +988,10 @@ public static <T, R> Observable<R> combineLatestDelayError(ObservableSource<? ex
958988
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
959989
* If that input source is also synchronous, other sources after it will not be subscribed to.
960990
* <p>
991+
* If provided iterable of ObservableSources is empty, the resulting sequence completes immediately without emitting
992+
* any items and without any calls to combiner function.
993+
*
994+
* <p>
961995
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/combineLatestDelayError.png" alt="">
962996
* <dl>
963997
* <dt><b>Scheduler:</b></dt>
@@ -997,6 +1031,10 @@ public static <T, R> Observable<R> combineLatestDelayError(Iterable<? extends Ob
9971031
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
9981032
* If that input source is also synchronous, other sources after it will not be subscribed to.
9991033
* <p>
1034+
* If provided iterable of ObservableSources is empty, the resulting sequence completes immediately without emitting
1035+
* any items and without any calls to combiner function.
1036+
*
1037+
* <p>
10001038
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/combineLatestDelayError.png" alt="">
10011039
* <dl>
10021040
* <dt><b>Scheduler:</b></dt>

0 commit comments

Comments
 (0)