diff --git a/src/main/java/io/reactivex/rxjava3/core/Flowable.java b/src/main/java/io/reactivex/rxjava3/core/Flowable.java index 8bb6156659..fe27086f37 100644 --- a/src/main/java/io/reactivex/rxjava3/core/Flowable.java +++ b/src/main/java/io/reactivex/rxjava3/core/Flowable.java @@ -7475,8 +7475,10 @@ public final Flowable cacheWithInitialCapacity(int initialCapacity) { } /** - * Returns a {@code Flowable} that emits the items emitted by the current {@code Flowable}, converted to the specified - * type. + * Returns a {@code Flowable} that emits the upstream items while + * they can be cast via {@link Class#cast(Object)} until the upstream terminates, + * or until the upstream signals an item which can't be cast, + * resulting in a {@link ClassCastException} to be signaled to the downstream. *

* *

@@ -7489,8 +7491,7 @@ public final Flowable cacheWithInitialCapacity(int initialCapacity) { * * @param the output value type cast to * @param clazz - * the target class type that {@code cast} will cast the items emitted by the current {@code Flowable} - * into before emitting them from the resulting {@code Flowable} + * the target class to use to try and cast the upstream items into * @return the new {@code Flowable} instance * @throws NullPointerException if {@code clazz} is {@code null} * @see ReactiveX operators documentation: Map diff --git a/src/main/java/io/reactivex/rxjava3/core/Observable.java b/src/main/java/io/reactivex/rxjava3/core/Observable.java index ac5bf8f0ae..14b2795715 100644 --- a/src/main/java/io/reactivex/rxjava3/core/Observable.java +++ b/src/main/java/io/reactivex/rxjava3/core/Observable.java @@ -6668,8 +6668,10 @@ public final Observable cacheWithInitialCapacity(int initialCapacity) { } /** - * Returns an {@code Observable} that emits the items emitted by the current {@code Observable}, converted to the specified - * type. + * Returns an {@code Observable} that emits the upstream items while + * they can be cast via {@link Class#cast(Object)} until the upstream terminates, + * or until the upstream signals an item which can't be cast, + * resulting in a {@link ClassCastException} to be signaled to the downstream. *

* *

@@ -6679,8 +6681,7 @@ public final Observable cacheWithInitialCapacity(int initialCapacity) { * * @param the output value type cast to * @param clazz - * the target class type that {@code cast} will cast the items emitted by the current {@code Observable} - * into before emitting them from the resulting {@code Observable} + * the target class to use to try and cast the upstream items into * @return the new {@code Observable} instance * @throws NullPointerException if {@code clazz} is {@code null} * @see ReactiveX operators documentation: Map