Skip to content

Commit 479a7a2

Browse files
authored
3.x: Remove a pointless concatMapIterable overload (#6837)
1 parent c67263f commit 479a7a2

File tree

2 files changed

+1
-34
lines changed

2 files changed

+1
-34
lines changed

src/main/java/io/reactivex/rxjava3/core/Observable.java

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7112,39 +7112,6 @@ public final <U> Observable<U> concatMapIterable(@NonNull Function<? super T, ?
71127112
return RxJavaPlugins.onAssembly(new ObservableFlattenIterable<>(this, mapper));
71137113
}
71147114

7115-
/**
7116-
* Returns an {@code Observable} that concatenate each item emitted by the current {@code Observable} with the values in an
7117-
* {@link Iterable} corresponding to that item that is generated by a selector.
7118-
* <p>
7119-
* <img width="640" height="275" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/concatMapIterable.o.png" alt="">
7120-
*
7121-
* <dl>
7122-
* <dt><b>Scheduler:</b></dt>
7123-
* <dd>{@code concatMapIterable} does not operate by default on a particular {@link Scheduler}.</dd>
7124-
* </dl>
7125-
*
7126-
* @param <U>
7127-
* the type of item emitted by the resulting {@code Observable}
7128-
* @param mapper
7129-
* a function that returns an {@code Iterable} sequence of values for when given an item emitted by the
7130-
* current {@code Observable}
7131-
* @param bufferSize
7132-
* the number of elements expected from the current {@code Observable} to be buffered
7133-
* @return an {@code Observable} that emits the results of concatenating the items emitted by the current {@code Observable} with
7134-
* the values in the {@code Iterable}s corresponding to those items
7135-
* @throws NullPointerException if {@code mapper} is {@code null}
7136-
* @throws IllegalArgumentException if {@code bufferSize} is non-positive
7137-
* @see <a href="http://reactivex.io/documentation/operators/flatmap.html">ReactiveX operators documentation: FlatMap</a>
7138-
*/
7139-
@CheckReturnValue
7140-
@SchedulerSupport(SchedulerSupport.NONE)
7141-
@NonNull
7142-
public final <U> Observable<U> concatMapIterable(@NonNull Function<? super T, ? extends Iterable<? extends U>> mapper, int bufferSize) {
7143-
Objects.requireNonNull(mapper, "mapper is null");
7144-
ObjectHelper.verifyPositive(bufferSize, "bufferSize");
7145-
return concatMap(ObservableInternalHelper.flatMapIntoIterable(mapper), bufferSize);
7146-
}
7147-
71487115
/**
71497116
* Maps the upstream items into {@link MaybeSource}s and subscribes to them one after the
71507117
* other succeeds or completes, emits their success value if available or terminates immediately if

src/test/java/io/reactivex/rxjava3/internal/operators/observable/ObservableConcatTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ public void concatMapIterableBufferSize() {
879879
public Iterable<Integer> apply(Integer v) throws Exception {
880880
return Arrays.asList(1, 2, 3, 4, 5);
881881
}
882-
}, 1)
882+
})
883883
.test()
884884
.assertResult(1, 2, 3, 4, 5, 1, 2, 3, 4, 5);
885885
}

0 commit comments

Comments
 (0)