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

2.x: fix concatMapEager should accept 0 for prefetch #5189

Merged
merged 2 commits into from
Mar 15, 2017
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
2 changes: 1 addition & 1 deletion src/main/java/io/reactivex/Flowable.java
Original file line number Diff line number Diff line change
Expand Up @@ -6789,7 +6789,7 @@ public final <R> Flowable<R> concatMapEager(Function<? super T, ? extends Publis
* @param mapper the function that maps a sequence of values into a sequence of Publishers that will be
* eagerly concatenated
* @param maxConcurrency the maximum number of concurrent subscribed Publishers
* @param prefetch hints about the number of expected source sequence values
* @param prefetch hints about the number of expected values from each inner Publisher, must be positive
* @return the new Publisher instance with the specified concatenation behavior
* @since 2.0
*/
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/reactivex/Observable.java
Original file line number Diff line number Diff line change
Expand Up @@ -6082,7 +6082,7 @@ public final <R> Observable<R> concatMapEager(Function<? super T, ? extends Obse
* @param mapper the function that maps a sequence of values into a sequence of ObservableSources that will be
* eagerly concatenated
* @param maxConcurrency the maximum number of concurrent subscribed ObservableSources
* @param prefetch hints about the number of expected source sequence values
* @param prefetch hints about the number of expected values from each inner ObservableSource, must be positive
* @return the new ObservableSource instance with the specified concatenation behavior
* @since 2.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -542,12 +542,12 @@ public Flowable<Integer> apply(Integer t) {
}

@Test(expected = IllegalArgumentException.class)
public void testInvalidCapacityHint() {
public void testInvalidMaxConcurrent() {
Flowable.just(1).concatMapEager(toJust, 0, Flowable.bufferSize());
}

@Test(expected = IllegalArgumentException.class)
public void testInvalidMaxConcurrent() {
public void testInvalidCapacityHint() {
Flowable.just(1).concatMapEager(toJust, Flowable.bufferSize(), 0);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -509,12 +509,12 @@ public Observable<Integer> apply(Integer t) {
}

@Test(expected = IllegalArgumentException.class)
public void testInvalidCapacityHint() {
public void testInvalidMaxConcurrent() {
Observable.just(1).concatMapEager(toJust, 0, Observable.bufferSize());
}

@Test(expected = IllegalArgumentException.class)
public void testInvalidMaxConcurrent() {
public void testInvalidCapacityHint() {
Observable.just(1).concatMapEager(toJust, Observable.bufferSize(), 0);
}

Expand Down