diff --git a/src/main/java/io/reactivex/Single.java b/src/main/java/io/reactivex/Single.java index 8f4ab31fd4..2ef5a5d63e 100644 --- a/src/main/java/io/reactivex/Single.java +++ b/src/main/java/io/reactivex/Single.java @@ -1279,6 +1279,8 @@ public static Single wrap(SingleSource source) { * value and calls a zipper function with an array of these values to return a result * to be emitted to downstream. *

+ * If the {@code Iterable} of {@link SingleSource}s is empty a {@link NoSuchElementException} error is signalled after subscription. + *

* 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}. @@ -1294,7 +1296,8 @@ public static Single wrap(SingleSource source) { * * @param the common value type * @param the result value type - * @param sources the Iterable sequence of SingleSource instances + * @param sources the Iterable sequence of SingleSource instances. An empty sequence will result in an + * {@code onError} signal of {@link NoSuchElementException}. * @param zipper the function that receives an array with values from each SingleSource * and should return a value to be emitted to downstream * @return the new Single instance @@ -1721,6 +1724,8 @@ public static Single zip( * value and calls a zipper function with an array of these values to return a result * to be emitted to downstream. *

+ * If the array of {@link SingleSource}s is empty a {@link NoSuchElementException} error is signalled immediately. + *

* 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}. @@ -1736,7 +1741,8 @@ public static Single zip( * * @param the common value type * @param the result value type - * @param sources the array of SingleSource instances + * @param sources the array of SingleSource instances. An empty sequence will result in an + * {@code onError} signal of {@link NoSuchElementException}. * @param zipper the function that receives an array with values from each SingleSource * and should return a value to be emitted to downstream * @return the new Single instance