From b0ea013381facc5d878f5e14e514a05fe7b516f5 Mon Sep 17 00:00:00 2001 From: akarnokd Date: Mon, 13 Jan 2020 11:16:53 +0100 Subject: [PATCH] 3.x: Remove a pointless concatMapIterable overload --- .../io/reactivex/rxjava3/core/Observable.java | 33 ------------------- .../observable/ObservableConcatTest.java | 2 +- 2 files changed, 1 insertion(+), 34 deletions(-) diff --git a/src/main/java/io/reactivex/rxjava3/core/Observable.java b/src/main/java/io/reactivex/rxjava3/core/Observable.java index b226ae8994..a4b07af049 100644 --- a/src/main/java/io/reactivex/rxjava3/core/Observable.java +++ b/src/main/java/io/reactivex/rxjava3/core/Observable.java @@ -7112,39 +7112,6 @@ public final Observable concatMapIterable(@NonNull Function(this, mapper)); } - /** - * Returns an {@code Observable} that concatenate each item emitted by the current {@code Observable} with the values in an - * {@link Iterable} corresponding to that item that is generated by a selector. - *

- * - * - *

- *
Scheduler:
- *
{@code concatMapIterable} does not operate by default on a particular {@link Scheduler}.
- *
- * - * @param - * the type of item emitted by the resulting {@code Observable} - * @param mapper - * a function that returns an {@code Iterable} sequence of values for when given an item emitted by the - * current {@code Observable} - * @param bufferSize - * the number of elements expected from the current {@code Observable} to be buffered - * @return an {@code Observable} that emits the results of concatenating the items emitted by the current {@code Observable} with - * the values in the {@code Iterable}s corresponding to those items - * @throws NullPointerException if {@code mapper} is {@code null} - * @throws IllegalArgumentException if {@code bufferSize} is non-positive - * @see ReactiveX operators documentation: FlatMap - */ - @CheckReturnValue - @SchedulerSupport(SchedulerSupport.NONE) - @NonNull - public final Observable concatMapIterable(@NonNull Function> mapper, int bufferSize) { - Objects.requireNonNull(mapper, "mapper is null"); - ObjectHelper.verifyPositive(bufferSize, "bufferSize"); - return concatMap(ObservableInternalHelper.flatMapIntoIterable(mapper), bufferSize); - } - /** * Maps the upstream items into {@link MaybeSource}s and subscribes to them one after the * other succeeds or completes, emits their success value if available or terminates immediately if diff --git a/src/test/java/io/reactivex/rxjava3/internal/operators/observable/ObservableConcatTest.java b/src/test/java/io/reactivex/rxjava3/internal/operators/observable/ObservableConcatTest.java index b1c42a1175..90e3dc112b 100644 --- a/src/test/java/io/reactivex/rxjava3/internal/operators/observable/ObservableConcatTest.java +++ b/src/test/java/io/reactivex/rxjava3/internal/operators/observable/ObservableConcatTest.java @@ -879,7 +879,7 @@ public void concatMapIterableBufferSize() { public Iterable apply(Integer v) throws Exception { return Arrays.asList(1, 2, 3, 4, 5); } - }, 1) + }) .test() .assertResult(1, 2, 3, 4, 5, 1, 2, 3, 4, 5); }