Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.x: Remove a pointless Observable.concatMapIterable overload #6837

Merged
merged 1 commit into from
Jan 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions src/main/java/io/reactivex/rxjava3/core/Observable.java
Original file line number Diff line number Diff line change
Expand Up @@ -7112,39 +7112,6 @@ public final <U> Observable<U> concatMapIterable(@NonNull Function<? super T, ?
return RxJavaPlugins.onAssembly(new ObservableFlattenIterable<>(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.
* <p>
* <img width="640" height="275" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/concatMapIterable.o.png" alt="">
*
* <dl>
* <dt><b>Scheduler:</b></dt>
* <dd>{@code concatMapIterable} does not operate by default on a particular {@link Scheduler}.</dd>
* </dl>
*
* @param <U>
* 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 <a href="http://reactivex.io/documentation/operators/flatmap.html">ReactiveX operators documentation: FlatMap</a>
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
@NonNull
public final <U> Observable<U> concatMapIterable(@NonNull Function<? super T, ? extends Iterable<? extends U>> 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ public void concatMapIterableBufferSize() {
public Iterable<Integer> 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);
}
Expand Down