Skip to content

Commit ce1f2d0

Browse files
nmoriokaakarnokd
authored andcommitted
2.x: fix concatMapEager should accept 0 for prefetch (ReactiveX#5189)
1 parent b58642b commit ce1f2d0

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/main/java/io/reactivex/Flowable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6789,7 +6789,7 @@ public final <R> Flowable<R> concatMapEager(Function<? super T, ? extends Publis
67896789
* @param mapper the function that maps a sequence of values into a sequence of Publishers that will be
67906790
* eagerly concatenated
67916791
* @param maxConcurrency the maximum number of concurrent subscribed Publishers
6792-
* @param prefetch hints about the number of expected source sequence values
6792+
* @param prefetch hints about the number of expected values from each inner Publisher, must be positive
67936793
* @return the new Publisher instance with the specified concatenation behavior
67946794
* @since 2.0
67956795
*/

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6082,7 +6082,7 @@ public final <R> Observable<R> concatMapEager(Function<? super T, ? extends Obse
60826082
* @param mapper the function that maps a sequence of values into a sequence of ObservableSources that will be
60836083
* eagerly concatenated
60846084
* @param maxConcurrency the maximum number of concurrent subscribed ObservableSources
6085-
* @param prefetch hints about the number of expected source sequence values
6085+
* @param prefetch hints about the number of expected values from each inner ObservableSource, must be positive
60866086
* @return the new ObservableSource instance with the specified concatenation behavior
60876087
* @since 2.0
60886088
*/

src/test/java/io/reactivex/internal/operators/flowable/FlowableConcatMapEagerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,12 +542,12 @@ public Flowable<Integer> apply(Integer t) {
542542
}
543543

544544
@Test(expected = IllegalArgumentException.class)
545-
public void testInvalidCapacityHint() {
545+
public void testInvalidMaxConcurrent() {
546546
Flowable.just(1).concatMapEager(toJust, 0, Flowable.bufferSize());
547547
}
548548

549549
@Test(expected = IllegalArgumentException.class)
550-
public void testInvalidMaxConcurrent() {
550+
public void testInvalidCapacityHint() {
551551
Flowable.just(1).concatMapEager(toJust, Flowable.bufferSize(), 0);
552552
}
553553

src/test/java/io/reactivex/internal/operators/observable/ObservableConcatMapEagerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,12 +509,12 @@ public Observable<Integer> apply(Integer t) {
509509
}
510510

511511
@Test(expected = IllegalArgumentException.class)
512-
public void testInvalidCapacityHint() {
512+
public void testInvalidMaxConcurrent() {
513513
Observable.just(1).concatMapEager(toJust, 0, Observable.bufferSize());
514514
}
515515

516516
@Test(expected = IllegalArgumentException.class)
517-
public void testInvalidMaxConcurrent() {
517+
public void testInvalidCapacityHint() {
518518
Observable.just(1).concatMapEager(toJust, Observable.bufferSize(), 0);
519519
}
520520

0 commit comments

Comments
 (0)