@@ -183,7 +183,7 @@ public abstract class Flowable<T> implements Publisher<T> {
183
183
@NonNull
184
184
@BackpressureSupport(BackpressureKind.PASS_THROUGH)
185
185
@SchedulerSupport(SchedulerSupport.NONE)
186
- public static <T> Flowable<T> amb(Iterable<? extends Publisher<? extends T>> sources) {
186
+ public static <T> Flowable<T> amb(@NonNull Iterable<? extends Publisher<? extends T>> sources) {
187
187
Objects.requireNonNull(sources, "sources is null");
188
188
return RxJavaPlugins.onAssembly(new FlowableAmb<>(null, sources));
189
189
}
@@ -232,6 +232,7 @@ public static <T> Flowable<T> ambArray(Publisher<? extends T>... sources) {
232
232
* <em>before</em> the Flowable class is loaded.
233
233
* @return the default internal buffer size.
234
234
*/
235
+ @CheckReturnValue
235
236
public static int bufferSize() {
236
237
return BUFFER_SIZE;
237
238
}
@@ -673,6 +674,7 @@ public static <T1, T2, R> Flowable<R> combineLatest(
673
674
@NonNull BiFunction<? super T1, ? super T2, ? extends R> combiner) {
674
675
Objects.requireNonNull(source1, "source1 is null");
675
676
Objects.requireNonNull(source2, "source2 is null");
677
+ Objects.requireNonNull(combiner, "combiner is null");
676
678
return combineLatestArray(new Publisher[] { source1, source2 }, Functions.toFunction(combiner), bufferSize());
677
679
}
678
680
@@ -723,6 +725,7 @@ public static <T1, T2, T3, R> Flowable<R> combineLatest(
723
725
Objects.requireNonNull(source1, "source1 is null");
724
726
Objects.requireNonNull(source2, "source2 is null");
725
727
Objects.requireNonNull(source3, "source3 is null");
728
+ Objects.requireNonNull(combiner, "combiner is null");
726
729
return combineLatestArray(new Publisher[] { source1, source2, source3 }, Functions.toFunction(combiner), bufferSize());
727
730
}
728
731
@@ -777,6 +780,7 @@ public static <T1, T2, T3, T4, R> Flowable<R> combineLatest(
777
780
Objects.requireNonNull(source2, "source2 is null");
778
781
Objects.requireNonNull(source3, "source3 is null");
779
782
Objects.requireNonNull(source4, "source4 is null");
783
+ Objects.requireNonNull(combiner, "combiner is null");
780
784
return combineLatestArray(new Publisher[] { source1, source2, source3, source4 }, Functions.toFunction(combiner), bufferSize());
781
785
}
782
786
@@ -836,6 +840,7 @@ public static <T1, T2, T3, T4, T5, R> Flowable<R> combineLatest(
836
840
Objects.requireNonNull(source3, "source3 is null");
837
841
Objects.requireNonNull(source4, "source4 is null");
838
842
Objects.requireNonNull(source5, "source5 is null");
843
+ Objects.requireNonNull(combiner, "combiner is null");
839
844
return combineLatestArray(new Publisher[] { source1, source2, source3, source4, source5 }, Functions.toFunction(combiner), bufferSize());
840
845
}
841
846
@@ -899,6 +904,7 @@ public static <T1, T2, T3, T4, T5, T6, R> Flowable<R> combineLatest(
899
904
Objects.requireNonNull(source4, "source4 is null");
900
905
Objects.requireNonNull(source5, "source5 is null");
901
906
Objects.requireNonNull(source6, "source6 is null");
907
+ Objects.requireNonNull(combiner, "combiner is null");
902
908
return combineLatestArray(new Publisher[] { source1, source2, source3, source4, source5, source6 }, Functions.toFunction(combiner), bufferSize());
903
909
}
904
910
@@ -967,6 +973,7 @@ public static <T1, T2, T3, T4, T5, T6, T7, R> Flowable<R> combineLatest(
967
973
Objects.requireNonNull(source5, "source5 is null");
968
974
Objects.requireNonNull(source6, "source6 is null");
969
975
Objects.requireNonNull(source7, "source7 is null");
976
+ Objects.requireNonNull(combiner, "combiner is null");
970
977
return combineLatestArray(new Publisher[] { source1, source2, source3, source4, source5, source6, source7 }, Functions.toFunction(combiner), bufferSize());
971
978
}
972
979
@@ -1039,6 +1046,7 @@ public static <T1, T2, T3, T4, T5, T6, T7, T8, R> Flowable<R> combineLatest(
1039
1046
Objects.requireNonNull(source6, "source6 is null");
1040
1047
Objects.requireNonNull(source7, "source7 is null");
1041
1048
Objects.requireNonNull(source8, "source8 is null");
1049
+ Objects.requireNonNull(combiner, "combiner is null");
1042
1050
return combineLatestArray(new Publisher[] { source1, source2, source3, source4, source5, source6, source7, source8 }, Functions.toFunction(combiner), bufferSize());
1043
1051
}
1044
1052
@@ -1116,6 +1124,7 @@ public static <T1, T2, T3, T4, T5, T6, T7, T8, T9, R> Flowable<R> combineLatest(
1116
1124
Objects.requireNonNull(source7, "source7 is null");
1117
1125
Objects.requireNonNull(source8, "source8 is null");
1118
1126
Objects.requireNonNull(source9, "source9 is null");
1127
+ Objects.requireNonNull(combiner, "combiner is null");
1119
1128
return combineLatestArray(new Publisher[] { source1, source2, source3, source4, source5, source6, source7, source8, source9 }, Functions.toFunction(combiner), bufferSize());
1120
1129
}
1121
1130
@@ -4735,6 +4744,7 @@ public static <T1, T2, R> Flowable<R> zip(
4735
4744
@NonNull BiFunction<? super T1, ? super T2, ? extends R> zipper) {
4736
4745
Objects.requireNonNull(source1, "source1 is null");
4737
4746
Objects.requireNonNull(source2, "source2 is null");
4747
+ Objects.requireNonNull(zipper, "zipper is null");
4738
4748
return zipArray(Functions.toFunction(zipper), false, bufferSize(), source1, source2);
4739
4749
}
4740
4750
@@ -4796,6 +4806,7 @@ public static <T1, T2, R> Flowable<R> zip(
4796
4806
@NonNull BiFunction<? super T1, ? super T2, ? extends R> zipper, boolean delayError) {
4797
4807
Objects.requireNonNull(source1, "source1 is null");
4798
4808
Objects.requireNonNull(source2, "source2 is null");
4809
+ Objects.requireNonNull(zipper, "zipper is null");
4799
4810
return zipArray(Functions.toFunction(zipper), delayError, bufferSize(), source1, source2);
4800
4811
}
4801
4812
@@ -4858,6 +4869,7 @@ public static <T1, T2, R> Flowable<R> zip(
4858
4869
@NonNull BiFunction<? super T1, ? super T2, ? extends R> zipper, boolean delayError, int bufferSize) {
4859
4870
Objects.requireNonNull(source1, "source1 is null");
4860
4871
Objects.requireNonNull(source2, "source2 is null");
4872
+ Objects.requireNonNull(zipper, "zipper is null");
4861
4873
return zipArray(Functions.toFunction(zipper), delayError, bufferSize, source1, source2);
4862
4874
}
4863
4875
@@ -4923,6 +4935,7 @@ public static <T1, T2, T3, R> Flowable<R> zip(
4923
4935
Objects.requireNonNull(source1, "source1 is null");
4924
4936
Objects.requireNonNull(source2, "source2 is null");
4925
4937
Objects.requireNonNull(source3, "source3 is null");
4938
+ Objects.requireNonNull(zipper, "zipper is null");
4926
4939
return zipArray(Functions.toFunction(zipper), false, bufferSize(), source1, source2, source3);
4927
4940
}
4928
4941
@@ -4993,6 +5006,7 @@ public static <T1, T2, T3, T4, R> Flowable<R> zip(
4993
5006
Objects.requireNonNull(source2, "source2 is null");
4994
5007
Objects.requireNonNull(source3, "source3 is null");
4995
5008
Objects.requireNonNull(source4, "source4 is null");
5009
+ Objects.requireNonNull(zipper, "zipper is null");
4996
5010
return zipArray(Functions.toFunction(zipper), false, bufferSize(), source1, source2, source3, source4);
4997
5011
}
4998
5012
@@ -5067,6 +5081,7 @@ public static <T1, T2, T3, T4, T5, R> Flowable<R> zip(
5067
5081
Objects.requireNonNull(source3, "source3 is null");
5068
5082
Objects.requireNonNull(source4, "source4 is null");
5069
5083
Objects.requireNonNull(source5, "source5 is null");
5084
+ Objects.requireNonNull(zipper, "zipper is null");
5070
5085
return zipArray(Functions.toFunction(zipper), false, bufferSize(), source1, source2, source3, source4, source5);
5071
5086
}
5072
5087
@@ -5144,6 +5159,7 @@ public static <T1, T2, T3, T4, T5, T6, R> Flowable<R> zip(
5144
5159
Objects.requireNonNull(source4, "source4 is null");
5145
5160
Objects.requireNonNull(source5, "source5 is null");
5146
5161
Objects.requireNonNull(source6, "source6 is null");
5162
+ Objects.requireNonNull(zipper, "zipper is null");
5147
5163
return zipArray(Functions.toFunction(zipper), false, bufferSize(), source1, source2, source3, source4, source5, source6);
5148
5164
}
5149
5165
@@ -5226,6 +5242,7 @@ public static <T1, T2, T3, T4, T5, T6, T7, R> Flowable<R> zip(
5226
5242
Objects.requireNonNull(source5, "source5 is null");
5227
5243
Objects.requireNonNull(source6, "source6 is null");
5228
5244
Objects.requireNonNull(source7, "source7 is null");
5245
+ Objects.requireNonNull(zipper, "zipper is null");
5229
5246
return zipArray(Functions.toFunction(zipper), false, bufferSize(), source1, source2, source3, source4, source5, source6, source7);
5230
5247
}
5231
5248
@@ -5312,6 +5329,7 @@ public static <T1, T2, T3, T4, T5, T6, T7, T8, R> Flowable<R> zip(
5312
5329
Objects.requireNonNull(source6, "source6 is null");
5313
5330
Objects.requireNonNull(source7, "source7 is null");
5314
5331
Objects.requireNonNull(source8, "source8 is null");
5332
+ Objects.requireNonNull(zipper, "zipper is null");
5315
5333
return zipArray(Functions.toFunction(zipper), false, bufferSize(), source1, source2, source3, source4, source5, source6, source7, source8);
5316
5334
}
5317
5335
@@ -5403,6 +5421,7 @@ public static <T1, T2, T3, T4, T5, T6, T7, T8, T9, R> Flowable<R> zip(
5403
5421
Objects.requireNonNull(source7, "source7 is null");
5404
5422
Objects.requireNonNull(source8, "source8 is null");
5405
5423
Objects.requireNonNull(source9, "source9 is null");
5424
+ Objects.requireNonNull(zipper, "zipper is null");
5406
5425
return zipArray(Functions.toFunction(zipper), false, bufferSize(), source1, source2, source3, source4, source5, source6, source7, source8, source9);
5407
5426
}
5408
5427
@@ -6791,7 +6810,7 @@ public final <B> Flowable<List<T>> buffer(@NonNull Publisher<B> boundaryIndicato
6791
6810
@BackpressureSupport(BackpressureKind.ERROR)
6792
6811
@SchedulerSupport(SchedulerSupport.NONE)
6793
6812
@NonNull
6794
- public final <B> Flowable<List<T>> buffer(@NonNull Publisher<B> boundaryIndicator, final int initialCapacity) {
6813
+ public final <B> Flowable<List<T>> buffer(@NonNull Publisher<B> boundaryIndicator, int initialCapacity) {
6795
6814
ObjectHelper.verifyPositive(initialCapacity, "initialCapacity");
6796
6815
return buffer(boundaryIndicator, Functions.<T>createArrayList(initialCapacity));
6797
6816
}
@@ -12899,7 +12918,7 @@ public final <R> Flowable<R> replay(@NonNull Function<? super Flowable<T>, ? ext
12899
12918
@NonNull
12900
12919
@BackpressureSupport(BackpressureKind.FULL)
12901
12920
@SchedulerSupport(SchedulerSupport.NONE)
12902
- public final <R> Flowable<R> replay(@NonNull Function<? super Flowable<T>, ? extends Publisher<R>> selector, final int bufferSize) {
12921
+ public final <R> Flowable<R> replay(@NonNull Function<? super Flowable<T>, ? extends Publisher<R>> selector, int bufferSize) {
12903
12922
Objects.requireNonNull(selector, "selector is null");
12904
12923
ObjectHelper.verifyPositive(bufferSize, "bufferSize");
12905
12924
return FlowableReplay.multicastSelector(FlowableInternalHelper.replaySupplier(this, bufferSize, false), selector);
@@ -12942,7 +12961,7 @@ public final <R> Flowable<R> replay(@NonNull Function<? super Flowable<T>, ? ext
12942
12961
@NonNull
12943
12962
@BackpressureSupport(BackpressureKind.FULL)
12944
12963
@SchedulerSupport(SchedulerSupport.NONE)
12945
- public final <R> Flowable<R> replay(@NonNull Function<? super Flowable<T>, ? extends Publisher<R>> selector, final int bufferSize, boolean eagerTruncate) {
12964
+ public final <R> Flowable<R> replay(@NonNull Function<? super Flowable<T>, ? extends Publisher<R>> selector, int bufferSize, boolean eagerTruncate) {
12946
12965
Objects.requireNonNull(selector, "selector is null");
12947
12966
ObjectHelper.verifyPositive(bufferSize, "bufferSize");
12948
12967
return FlowableReplay.multicastSelector(FlowableInternalHelper.replaySupplier(this, bufferSize, eagerTruncate), selector);
@@ -13551,7 +13570,7 @@ public final ConnectableFlowable<T> replay(long time, @NonNull TimeUnit unit, @N
13551
13570
@BackpressureSupport(BackpressureKind.FULL)
13552
13571
@SchedulerSupport(SchedulerSupport.CUSTOM)
13553
13572
@NonNull
13554
- public final ConnectableFlowable<T> replay(final long time, @NonNull TimeUnit unit, @NonNull Scheduler scheduler, boolean eagerTruncate) {
13573
+ public final ConnectableFlowable<T> replay(long time, @NonNull TimeUnit unit, @NonNull Scheduler scheduler, boolean eagerTruncate) {
13555
13574
Objects.requireNonNull(unit, "unit is null");
13556
13575
Objects.requireNonNull(scheduler, "scheduler is null");
13557
13576
return FlowableReplay.create(this, time, unit, scheduler, eagerTruncate);
@@ -16930,7 +16949,7 @@ public final <U, V> Flowable<T> timeout(
16930
16949
@NonNull Publisher<U> firstTimeoutIndicator,
16931
16950
@NonNull Function<? super T, ? extends Publisher<V>> itemTimeoutIndicator,
16932
16951
@NonNull Publisher<? extends T> other) {
16933
- Objects.requireNonNull(firstTimeoutIndicator, "firstTimeoutSelector is null");
16952
+ Objects.requireNonNull(firstTimeoutIndicator, "firstTimeoutIndicator is null");
16934
16953
Objects.requireNonNull(other, "other is null");
16935
16954
return timeout0(firstTimeoutIndicator, itemTimeoutIndicator, other);
16936
16955
}
@@ -17152,7 +17171,7 @@ public final Single<List<T>> toList() {
17152
17171
@BackpressureSupport(BackpressureKind.UNBOUNDED_IN)
17153
17172
@SchedulerSupport(SchedulerSupport.NONE)
17154
17173
@NonNull
17155
- public final Single<List<T>> toList(final int capacityHint) {
17174
+ public final Single<List<T>> toList(int capacityHint) {
17156
17175
ObjectHelper.verifyPositive(capacityHint, "capacityHint");
17157
17176
return RxJavaPlugins.onAssembly(new FlowableToListSingle<>(this, Functions.<T>createArrayList(capacityHint)));
17158
17177
}
@@ -18470,6 +18489,7 @@ public final <U, V> Flowable<Flowable<T>> window(
18470
18489
@NonNull Function3<? super T, ? super T1, ? super T2, R> combiner) {
18471
18490
Objects.requireNonNull(source1, "source1 is null");
18472
18491
Objects.requireNonNull(source2, "source2 is null");
18492
+ Objects.requireNonNull(combiner, "combiner is null");
18473
18493
Function<Object[], R> f = Functions.toFunction(combiner);
18474
18494
return withLatestFrom(new Publisher[] { source1, source2 }, f);
18475
18495
}
@@ -18513,6 +18533,7 @@ public final <U, V> Flowable<Flowable<T>> window(
18513
18533
Objects.requireNonNull(source1, "source1 is null");
18514
18534
Objects.requireNonNull(source2, "source2 is null");
18515
18535
Objects.requireNonNull(source3, "source3 is null");
18536
+ Objects.requireNonNull(combiner, "combiner is null");
18516
18537
Function<Object[], R> f = Functions.toFunction(combiner);
18517
18538
return withLatestFrom(new Publisher[] { source1, source2, source3 }, f);
18518
18539
}
@@ -18559,6 +18580,7 @@ public final <U, V> Flowable<Flowable<T>> window(
18559
18580
Objects.requireNonNull(source2, "source2 is null");
18560
18581
Objects.requireNonNull(source3, "source3 is null");
18561
18582
Objects.requireNonNull(source4, "source4 is null");
18583
+ Objects.requireNonNull(combiner, "combiner is null");
18562
18584
Function<Object[], R> f = Functions.toFunction(combiner);
18563
18585
return withLatestFrom(new Publisher[] { source1, source2, source3, source4 }, f);
18564
18586
}
0 commit comments