diff --git a/src/main/java/io/reactivex/Flowable.java b/src/main/java/io/reactivex/Flowable.java
index 27ba8c954d..0dad7ebcc9 100644
--- a/src/main/java/io/reactivex/Flowable.java
+++ b/src/main/java/io/reactivex/Flowable.java
@@ -140,6 +140,11 @@ public static int bufferSize() {
* Combines a collection of source Publishers by emitting an item that aggregates the latest values of each of
* the source Publishers each time an item is received from any of the source Publishers, where this
* aggregation is defined by a specified function.
+ *
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
+ * {@code Function} passed to the method would trigger a {@code ClassCastException}.
+ *
*
* - Backpressure:
* - The returned {@code Publisher} honors backpressure from downstream. The source {@code Publisher}s
@@ -163,7 +168,7 @@ public static int bufferSize() {
*/
@SchedulerSupport(SchedulerSupport.NONE)
@BackpressureSupport(BackpressureKind.FULL)
- public static Flowable combineLatest(Publisher extends T>[] sources, Function super T[], ? extends R> combiner) {
+ public static Flowable combineLatest(Publisher extends T>[] sources, Function super Object[], ? extends R> combiner) {
return combineLatest(sources, combiner, bufferSize());
}
@@ -171,6 +176,11 @@ public static Flowable combineLatest(Publisher extends T>[] sources,
* Combines a collection of source Publishers by emitting an item that aggregates the latest values of each of
* the source Publishers each time an item is received from any of the source Publishers, where this
* aggregation is defined by a specified function.
+ *
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
+ * {@code Function} passed to the method would trigger a {@code ClassCastException}.
+ *
*
* - Backpressure:
* - The returned {@code Publisher} honors backpressure from downstream. The source {@code Publisher}s
@@ -194,7 +204,7 @@ public static Flowable combineLatest(Publisher extends T>[] sources,
*/
@SchedulerSupport(SchedulerSupport.NONE)
@BackpressureSupport(BackpressureKind.FULL)
- public static Flowable combineLatest(Function super T[], ? extends R> combiner, Publisher extends T>... sources) {
+ public static Flowable combineLatest(Function super Object[], ? extends R> combiner, Publisher extends T>... sources) {
return combineLatest(sources, combiner, bufferSize());
}
@@ -202,6 +212,11 @@ public static Flowable combineLatest(Function super T[], ? extends R
* Combines a collection of source Publishers by emitting an item that aggregates the latest values of each of
* the source Publishers each time an item is received from any of the source Publishers, where this
* aggregation is defined by a specified function.
+ *
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
+ * {@code Function} passed to the method would trigger a {@code ClassCastException}.
+ *
*
* - Backpressure:
* - The returned {@code Publisher} honors backpressure from downstream. The source {@code Publisher}s
@@ -227,7 +242,7 @@ public static Flowable combineLatest(Function super T[], ? extends R
*/
@SchedulerSupport(SchedulerSupport.NONE)
@BackpressureSupport(BackpressureKind.FULL)
- public static Flowable combineLatest(Publisher extends T>[] sources, Function super T[], ? extends R> combiner, int bufferSize) {
+ public static Flowable combineLatest(Publisher extends T>[] sources, Function super Object[], ? extends R> combiner, int bufferSize) {
ObjectHelper.requireNonNull(sources, "sources is null");
if (sources.length == 0) {
return empty();
@@ -241,6 +256,11 @@ public static Flowable combineLatest(Publisher extends T>[] sources,
* Combines a collection of source Publishers by emitting an item that aggregates the latest values of each of
* the source Publishers each time an item is received from any of the source Publishers, where this
* aggregation is defined by a specified function.
+ *
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
+ * {@code Function} passed to the method would trigger a {@code ClassCastException}.
+ *
*
* - Backpressure:
* - The returned {@code Publisher} honors backpressure from downstream. The source {@code Publisher}s
@@ -265,7 +285,7 @@ public static Flowable combineLatest(Publisher extends T>[] sources,
@SchedulerSupport(SchedulerSupport.NONE)
@BackpressureSupport(BackpressureKind.FULL)
public static Flowable combineLatest(Iterable extends Publisher extends T>> sources,
- Function super T[], ? extends R> combiner) {
+ Function super Object[], ? extends R> combiner) {
return combineLatest(sources, combiner, bufferSize());
}
@@ -273,6 +293,11 @@ public static Flowable combineLatest(Iterable extends Publisher ex
* Combines a collection of source Publishers by emitting an item that aggregates the latest values of each of
* the source Publishers each time an item is received from any of the source Publishers, where this
* aggregation is defined by a specified function.
+ *
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
+ * {@code Function} passed to the method would trigger a {@code ClassCastException}.
+ *
*
* - Backpressure:
* - The returned {@code Publisher} honors backpressure from downstream. The source {@code Publisher}s
@@ -299,7 +324,7 @@ public static Flowable combineLatest(Iterable extends Publisher ex
@SchedulerSupport(SchedulerSupport.NONE)
@BackpressureSupport(BackpressureKind.FULL)
public static Flowable combineLatest(Iterable extends Publisher extends T>> sources,
- Function super T[], ? extends R> combiner, int bufferSize) {
+ Function super Object[], ? extends R> combiner, int bufferSize) {
ObjectHelper.requireNonNull(sources, "sources is null");
ObjectHelper.requireNonNull(combiner, "combiner is null");
ObjectHelper.verifyPositive(bufferSize, "bufferSize");
@@ -310,6 +335,11 @@ public static Flowable combineLatest(Iterable extends Publisher ex
* Combines a collection of source Publishers by emitting an item that aggregates the latest values of each of
* the source Publishers each time an item is received from any of the source Publishers, where this
* aggregation is defined by a specified function.
+ *
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
+ * {@code Function} passed to the method would trigger a {@code ClassCastException}.
+ *
*
* - Backpressure:
* - The returned {@code Publisher} honors backpressure from downstream. The source {@code Publisher}s
@@ -334,7 +364,7 @@ public static Flowable combineLatest(Iterable extends Publisher ex
@SchedulerSupport(SchedulerSupport.NONE)
@BackpressureSupport(BackpressureKind.FULL)
public static Flowable combineLatestDelayError(Publisher extends T>[] sources,
- Function super T[], ? extends R> combiner) {
+ Function super Object[], ? extends R> combiner) {
return combineLatestDelayError(sources, combiner, bufferSize());
}
@@ -343,6 +373,10 @@ public static Flowable combineLatestDelayError(Publisher extends T>[
* the source Publishers each time an item is received from any of the source Publishers, where this
* aggregation is defined by a specified function and delays any error from the sources until
* all source Publishers terminate.
+ *
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
+ * {@code Function} passed to the method would trigger a {@code ClassCastException}.
*
*
* - Backpressure:
@@ -367,7 +401,7 @@ public static Flowable combineLatestDelayError(Publisher extends T>[
*/
@SchedulerSupport(SchedulerSupport.NONE)
@BackpressureSupport(BackpressureKind.FULL)
- public static Flowable combineLatestDelayError(Function super T[], ? extends R> combiner,
+ public static Flowable combineLatestDelayError(Function super Object[], ? extends R> combiner,
Publisher extends T>... sources) {
return combineLatestDelayError(sources, combiner, bufferSize());
}
@@ -377,6 +411,10 @@ public static Flowable combineLatestDelayError(Function super T[], ?
* the source ObservableSources each time an item is received from any of the source Publisher, where this
* aggregation is defined by a specified function and delays any error from the sources until
* all source Publishers terminate.
+ *
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
+ * {@code Function} passed to the method would trigger a {@code ClassCastException}.
*
*
* - Scheduler:
@@ -398,7 +436,7 @@ public static Flowable combineLatestDelayError(Function super T[], ?
* @see ReactiveX operators documentation: CombineLatest
*/
@SchedulerSupport(SchedulerSupport.NONE)
- public static Flowable combineLatestDelayError(Function super T[], ? extends R> combiner,
+ public static Flowable combineLatestDelayError(Function super Object[], ? extends R> combiner,
int bufferSize, Publisher extends T>... sources) {
return combineLatestDelayError(sources, combiner, bufferSize);
}
@@ -408,6 +446,10 @@ public static Flowable combineLatestDelayError(Function super T[], ?
* the source Publishers each time an item is received from any of the source Publishers, where this
* aggregation is defined by a specified function and delays any error from the sources until
* all source Publishers terminate.
+ *
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
+ * {@code Function} passed to the method would trigger a {@code ClassCastException}.
*
*
* - Backpressure:
@@ -435,7 +477,7 @@ public static Flowable combineLatestDelayError(Function super T[], ?
@SchedulerSupport(SchedulerSupport.NONE)
@BackpressureSupport(BackpressureKind.FULL)
public static Flowable combineLatestDelayError(Publisher extends T>[] sources,
- Function super T[], ? extends R> combiner, int bufferSize) {
+ Function super Object[], ? extends R> combiner, int bufferSize) {
ObjectHelper.requireNonNull(sources, "sources is null");
ObjectHelper.requireNonNull(combiner, "combiner is null");
ObjectHelper.verifyPositive(bufferSize, "bufferSize");
@@ -450,6 +492,10 @@ public static Flowable combineLatestDelayError(Publisher extends T>[
* the source Publishers each time an item is received from any of the source Publishers, where this
* aggregation is defined by a specified function and delays any error from the sources until
* all source Publishers terminate.
+ *
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
+ * {@code Function} passed to the method would trigger a {@code ClassCastException}.
*
*
* - Backpressure:
@@ -475,7 +521,7 @@ public static Flowable combineLatestDelayError(Publisher extends T>[
@SchedulerSupport(SchedulerSupport.NONE)
@BackpressureSupport(BackpressureKind.FULL)
public static Flowable combineLatestDelayError(Iterable extends Publisher extends T>> sources,
- Function super T[], ? extends R> combiner) {
+ Function super Object[], ? extends R> combiner) {
return combineLatestDelayError(sources, combiner, bufferSize());
}
@@ -484,6 +530,10 @@ public static Flowable combineLatestDelayError(Iterable extends Publ
* the source Publishers each time an item is received from any of the source Publishers, where this
* aggregation is defined by a specified function and delays any error from the sources until
* all source Publishers terminate.
+ *
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
+ * {@code Function} passed to the method would trigger a {@code ClassCastException}.
*
*
* - Backpressure:
@@ -511,7 +561,7 @@ public static Flowable combineLatestDelayError(Iterable extends Publ
@SchedulerSupport(SchedulerSupport.NONE)
@BackpressureSupport(BackpressureKind.FULL)
public static Flowable combineLatestDelayError(Iterable extends Publisher extends T>> sources,
- Function super T[], ? extends R> combiner, int bufferSize) {
+ Function super Object[], ? extends R> combiner, int bufferSize) {
ObjectHelper.requireNonNull(sources, "sources is null");
ObjectHelper.requireNonNull(combiner, "combiner is null");
ObjectHelper.verifyPositive(bufferSize, "bufferSize");
@@ -14955,4 +15005,4 @@ public final TestSubscriber test(long initialRequest, boolean cancel) { // No
return ts;
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/io/reactivex/Maybe.java b/src/main/java/io/reactivex/Maybe.java
index 85a25fc3e0..cb0a0f0fc0 100644
--- a/src/main/java/io/reactivex/Maybe.java
+++ b/src/main/java/io/reactivex/Maybe.java
@@ -1343,6 +1343,11 @@ public static Maybe wrap(MaybeSource source) {
* Returns a Maybe that emits the results of a specified combiner function applied to combinations of
* items emitted, in sequence, by an Iterable of other MaybeSources.
*
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
+ * {@code Function} passed to the method would trigger a {@code ClassCastException}.
+ *
+ *
*
*
This operator terminates eagerly if any of the source MaybeSources signal an onError or onComplete. This
* also means it is possible some sources may not get subscribed to at all.
@@ -1362,7 +1367,7 @@ public static Maybe wrap(MaybeSource source) {
* @see ReactiveX operators documentation: Zip
*/
@SchedulerSupport(SchedulerSupport.NONE)
- public static Maybe zip(Iterable extends MaybeSource extends T>> sources, Function super T[], ? extends R> zipper) {
+ public static Maybe zip(Iterable extends MaybeSource extends T>> sources, Function super Object[], ? extends R> zipper) {
ObjectHelper.requireNonNull(zipper, "zipper is null");
ObjectHelper.requireNonNull(sources, "sources is null");
return RxJavaPlugins.onAssembly(new MaybeZipIterable(sources, zipper));
@@ -1774,6 +1779,11 @@ public static Maybe zip(
* Returns a Maybe that emits the results of a specified combiner function applied to combinations of
* items emitted, in sequence, by an array of other MaybeSources.
*
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
+ * {@code Function} passed to the method would trigger a {@code ClassCastException}.
+ *
+ *
*
*
This operator terminates eagerly if any of the source MaybeSources signal an onError or onComplete. This
* also means it is possible some sources may not get subscribed to at all.
@@ -1796,6 +1806,7 @@ public static Maybe zip(
@SchedulerSupport(SchedulerSupport.NONE)
public static Maybe zipArray(Function super Object[], ? extends R> zipper,
MaybeSource extends T>... sources) {
+ ObjectHelper.requireNonNull(sources, "sources is null");
if (sources.length == 0) {
return empty();
}
diff --git a/src/main/java/io/reactivex/Observable.java b/src/main/java/io/reactivex/Observable.java
index 5996e7180a..74469ee628 100644
--- a/src/main/java/io/reactivex/Observable.java
+++ b/src/main/java/io/reactivex/Observable.java
@@ -128,6 +128,11 @@ public static int bufferSize() {
* Combines a collection of source ObservableSources by emitting an item that aggregates the latest values of each of
* the source ObservableSources each time an item is received from any of the source ObservableSources, where this
* aggregation is defined by a specified function.
+ *
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
+ * {@code Function} passed to the method would trigger a {@code ClassCastException}.
+ *
*
* - Scheduler:
* - {@code combineLatest} does not operate by default on a particular {@link Scheduler}.
@@ -148,7 +153,7 @@ public static int bufferSize() {
* @see ReactiveX operators documentation: CombineLatest
*/
@SchedulerSupport(SchedulerSupport.NONE)
- public static Observable combineLatest(Function super T[], ? extends R> combiner, int bufferSize, ObservableSource extends T>... sources) {
+ public static Observable combineLatest(Function super Object[], ? extends R> combiner, int bufferSize, ObservableSource extends T>... sources) {
return combineLatest(sources, combiner, bufferSize);
}
@@ -156,6 +161,11 @@ public static Observable combineLatest(Function super T[], ? extends
* Combines a collection of source ObservableSources by emitting an item that aggregates the latest values of each of
* the source ObservableSources each time an item is received from any of the source ObservableSources, where this
* aggregation is defined by a specified function.
+ *
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
+ * {@code Function} passed to the method would trigger a {@code ClassCastException}.
+ *
*
* - Scheduler:
* - {@code combineLatest} does not operate by default on a particular {@link Scheduler}.
@@ -175,7 +185,7 @@ public static Observable combineLatest(Function super T[], ? extends
*/
@SchedulerSupport(SchedulerSupport.NONE)
public static Observable combineLatest(Iterable extends ObservableSource extends T>> sources,
- Function super T[], ? extends R> combiner) {
+ Function super Object[], ? extends R> combiner) {
return combineLatest(sources, combiner, bufferSize());
}
@@ -184,6 +194,11 @@ public static Observable combineLatest(Iterable extends ObservableSo
* Combines a collection of source ObservableSources by emitting an item that aggregates the latest values of each of
* the source ObservableSources each time an item is received from any of the source ObservableSources, where this
* aggregation is defined by a specified function.
+ *
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
+ * {@code Function} passed to the method would trigger a {@code ClassCastException}.
+ *
*
* - Scheduler:
* - {@code combineLatest} does not operate by default on a particular {@link Scheduler}.
@@ -205,7 +220,7 @@ public static Observable combineLatest(Iterable extends ObservableSo
*/
@SchedulerSupport(SchedulerSupport.NONE)
public static Observable combineLatest(Iterable extends ObservableSource extends T>> sources,
- Function super T[], ? extends R> combiner, int bufferSize) {
+ Function super Object[], ? extends R> combiner, int bufferSize) {
ObjectHelper.requireNonNull(sources, "sources is null");
ObjectHelper.requireNonNull(combiner, "combiner is null");
ObjectHelper.verifyPositive(bufferSize, "bufferSize");
@@ -219,6 +234,11 @@ public static Observable combineLatest(Iterable extends ObservableSo
* Combines a collection of source ObservableSources by emitting an item that aggregates the latest values of each of
* the source ObservableSources each time an item is received from any of the source ObservableSources, where this
* aggregation is defined by a specified function.
+ *
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
+ * {@code Function} passed to the method would trigger a {@code ClassCastException}.
+ *
*
* - Scheduler:
* - {@code combineLatest} does not operate by default on a particular {@link Scheduler}.
@@ -238,7 +258,7 @@ public static Observable combineLatest(Iterable extends ObservableSo
*/
@SchedulerSupport(SchedulerSupport.NONE)
public static Observable combineLatest(ObservableSource extends T>[] sources,
- Function super T[], ? extends R> combiner) {
+ Function super Object[], ? extends R> combiner) {
return combineLatest(sources, combiner, bufferSize());
}
@@ -246,6 +266,11 @@ public static Observable combineLatest(ObservableSource extends T>[]
* Combines a collection of source ObservableSources by emitting an item that aggregates the latest values of each of
* the source ObservableSources each time an item is received from any of the source ObservableSources, where this
* aggregation is defined by a specified function.
+ *
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
+ * {@code Function} passed to the method would trigger a {@code ClassCastException}.
+ *
*
* - Scheduler:
* - {@code combineLatest} does not operate by default on a particular {@link Scheduler}.
@@ -267,7 +292,7 @@ public static Observable combineLatest(ObservableSource extends T>[]
*/
@SchedulerSupport(SchedulerSupport.NONE)
public static Observable combineLatest(ObservableSource extends T>[] sources,
- Function super T[], ? extends R> combiner, int bufferSize) {
+ Function super Object[], ? extends R> combiner, int bufferSize) {
ObjectHelper.requireNonNull(sources, "sources is null");
if (sources.length == 0) {
return empty();
@@ -640,6 +665,11 @@ public static Observable combineLates
* Combines a collection of source ObservableSources by emitting an item that aggregates the latest values of each of
* the source ObservableSources each time an item is received from any of the source ObservableSources, where this
* aggregation is defined by a specified function.
+ *
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
+ * {@code Function} passed to the method would trigger a {@code ClassCastException}.
+ *
*
* - Scheduler:
* - {@code combineLatest} does not operate by default on a particular {@link Scheduler}.
@@ -659,7 +689,7 @@ public static Observable combineLates
*/
@SchedulerSupport(SchedulerSupport.NONE)
public static Observable combineLatestDelayError(ObservableSource extends T>[] sources,
- Function super T[], ? extends R> combiner) {
+ Function super Object[], ? extends R> combiner) {
return combineLatestDelayError(sources, combiner, bufferSize());
}
@@ -668,6 +698,10 @@ public static Observable combineLatestDelayError(ObservableSource ex
* the source ObservableSources each time an item is received from any of the source ObservableSources, where this
* aggregation is defined by a specified function and delays any error from the sources until
* all source ObservableSources terminate.
+ *
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
+ * {@code Function} passed to the method would trigger a {@code ClassCastException}.
*
*
* - Scheduler:
@@ -689,7 +723,7 @@ public static Observable combineLatestDelayError(ObservableSource ex
* @see ReactiveX operators documentation: CombineLatest
*/
@SchedulerSupport(SchedulerSupport.NONE)
- public static Observable combineLatestDelayError(Function super T[], ? extends R> combiner,
+ public static Observable combineLatestDelayError(Function super Object[], ? extends R> combiner,
int bufferSize, ObservableSource extends T>... sources) {
return combineLatestDelayError(sources, combiner, bufferSize);
}
@@ -699,6 +733,10 @@ public static Observable combineLatestDelayError(Function super T[],
* the source ObservableSources each time an item is received from any of the source ObservableSources, where this
* aggregation is defined by a specified function and delays any error from the sources until
* all source ObservableSources terminate.
+ *
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
+ * {@code Function} passed to the method would trigger a {@code ClassCastException}.
*
*
* - Scheduler:
@@ -721,7 +759,7 @@ public static Observable combineLatestDelayError(Function super T[],
*/
@SchedulerSupport(SchedulerSupport.NONE)
public static Observable combineLatestDelayError(ObservableSource extends T>[] sources,
- Function super T[], ? extends R> combiner, int bufferSize) {
+ Function super Object[], ? extends R> combiner, int bufferSize) {
ObjectHelper.verifyPositive(bufferSize, "bufferSize");
ObjectHelper.requireNonNull(combiner, "combiner is null");
if (sources.length == 0) {
@@ -737,6 +775,10 @@ public static Observable combineLatestDelayError(ObservableSource ex
* the source ObservableSources each time an item is received from any of the source ObservableSources, where this
* aggregation is defined by a specified function and delays any error from the sources until
* all source ObservableSources terminate.
+ *
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
+ * {@code Function} passed to the method would trigger a {@code ClassCastException}.
*
*
* - Scheduler:
@@ -757,7 +799,7 @@ public static Observable combineLatestDelayError(ObservableSource ex
*/
@SchedulerSupport(SchedulerSupport.NONE)
public static Observable combineLatestDelayError(Iterable extends ObservableSource extends T>> sources,
- Function super T[], ? extends R> combiner) {
+ Function super Object[], ? extends R> combiner) {
return combineLatestDelayError(sources, combiner, bufferSize());
}
@@ -766,6 +808,10 @@ public static Observable combineLatestDelayError(Iterable extends Ob
* the source ObservableSources each time an item is received from any of the source ObservableSources, where this
* aggregation is defined by a specified function and delays any error from the sources until
* all source ObservableSources terminate.
+ *
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
+ * {@code Function} passed to the method would trigger a {@code ClassCastException}.
*
*
* - Scheduler:
@@ -788,7 +834,7 @@ public static Observable combineLatestDelayError(Iterable extends Ob
*/
@SchedulerSupport(SchedulerSupport.NONE)
public static Observable combineLatestDelayError(Iterable extends ObservableSource extends T>> sources,
- Function super T[], ? extends R> combiner, int bufferSize) {
+ Function super Object[], ? extends R> combiner, int bufferSize) {
ObjectHelper.requireNonNull(sources, "sources is null");
ObjectHelper.requireNonNull(combiner, "combiner is null");
ObjectHelper.verifyPositive(bufferSize, "bufferSize");
@@ -3358,6 +3404,11 @@ public static Observable wrap(ObservableSource source) {
* use {@code doOnUnsubscribed()} as well or use {@code using()} to do cleanup in case of completion
* or unsubscription.
*
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
+ * {@code Function} passed to the method would trigger a {@code ClassCastException}.
+ *
+ *
*
*
* - Scheduler:
@@ -3375,7 +3426,7 @@ public static Observable wrap(ObservableSource source) {
* @see ReactiveX operators documentation: Zip
*/
@SchedulerSupport(SchedulerSupport.NONE)
- public static Observable zip(Iterable extends ObservableSource extends T>> sources, Function super T[], ? extends R> zipper) {
+ public static Observable zip(Iterable extends ObservableSource extends T>> sources, Function super Object[], ? extends R> zipper) {
ObjectHelper.requireNonNull(zipper, "zipper is null");
ObjectHelper.requireNonNull(sources, "sources is null");
return RxJavaPlugins.onAssembly(new ObservableZip(null, sources, zipper, bufferSize(), false));
@@ -3405,6 +3456,11 @@ public static Observable zip(Iterable extends ObservableSource ext
* use {@code doOnUnsubscribed()} as well or use {@code using()} to do cleanup in case of completion
* or unsubscription.
*
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
+ * {@code Function} passed to the method would trigger a {@code ClassCastException}.
+ *
+ *
*
*
* - Scheduler:
@@ -3423,7 +3479,7 @@ public static Observable zip(Iterable extends ObservableSource ext
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
@SchedulerSupport(SchedulerSupport.NONE)
- public static Observable zip(ObservableSource extends ObservableSource extends T>> sources, final Function super T[], ? extends R> zipper) {
+ public static Observable zip(ObservableSource extends ObservableSource extends T>> sources, final Function super Object[], ? extends R> zipper) {
ObjectHelper.requireNonNull(zipper, "zipper is null");
ObjectHelper.requireNonNull(sources, "sources is null");
return RxJavaPlugins.onAssembly(new ObservableToList(sources, 16)
@@ -4074,6 +4130,11 @@ public static Observable zip(
* use {@code doOnUnsubscribed()} as well or use {@code using()} to do cleanup in case of completion
* or unsubscription.
*
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
+ * {@code Function