@@ -342,14 +342,13 @@ public abstract class Maybe<@NonNull T> implements MaybeSource<T> {
342342 * @return the new {@code Flowable} instance with the specified concatenation behavior
343343 * @throws NullPointerException if {@code sources} is {@code null}
344344 */
345- @ SuppressWarnings ({ "rawtypes" , "unchecked" })
346345 @ BackpressureSupport (BackpressureKind .FULL )
347346 @ CheckReturnValue
348347 @ SchedulerSupport (SchedulerSupport .NONE )
349348 @ NonNull
350349 @ SafeVarargs
351350 public static <@ NonNull T > Flowable <T > concatArrayEager (@ NonNull MaybeSource <? extends T >... sources ) {
352- return Flowable . fromArray ( sources ). concatMapEager (( Function ) MaybeToPublisher . instance () );
351+ return concatArrayEager ( StandardConcurrentBufferedConfig . DELAY_ERRORS_BOUNDARY , sources );
353352 }
354353 /**
355354 * Concatenates a sequence of {@link MaybeSource} eagerly into a {@link Flowable} sequence.
@@ -379,10 +378,7 @@ public abstract class Maybe<@NonNull T> implements MaybeSource<T> {
379378 @ NonNull
380379 @ SafeVarargs
381380 public static <@ NonNull T > Flowable <T > concatArrayEager (@ NonNull StandardConcurrentBufferedConfig config , @ NonNull MaybeSource <? extends T >... sources ) {
382- if (config .delayErrors ()) {
383- return Flowable .fromArray (sources ).concatMapEagerDelayError ((Function )MaybeToPublisher .instance (), true , config .maxConcurrency (), config .bufferSize ());
384- }
385- return Flowable .fromArray (sources ).concatMapEager ((Function )MaybeToPublisher .instance (), config .maxConcurrency (), config .bufferSize ());
381+ return Flowable .fromArray (sources ).concatMapEager ((Function )MaybeToPublisher .instance (), config );
386382 }
387383
388384 /**
@@ -410,11 +406,7 @@ public abstract class Maybe<@NonNull T> implements MaybeSource<T> {
410406 @ NonNull
411407 @ SchedulerSupport (SchedulerSupport .NONE )
412408 public static <@ NonNull T > Flowable <T > concat (@ NonNull Iterable <@ NonNull ? extends MaybeSource <? extends T >> sources , @ NonNull StandardBufferedConfig config ) {
413- Objects .requireNonNull (config , "config is null" );
414- if (config .delayErrors ()) {
415- return Flowable .fromIterable (sources ).concatMapMaybeDelayError (Functions .identity (), true , config .bufferSize ());
416- }
417- return Flowable .fromIterable (sources ).concatMapMaybe (Functions .identity (), config .bufferSize ());
409+ return Flowable .fromIterable (sources ).concatMapMaybe (Functions .identity (), config );
418410 }
419411
420412 /**
@@ -442,7 +434,7 @@ public abstract class Maybe<@NonNull T> implements MaybeSource<T> {
442434 @ SchedulerSupport (SchedulerSupport .NONE )
443435 @ NonNull
444436 public static <@ NonNull T > Flowable <T > concatEager (@ NonNull Iterable <@ NonNull ? extends MaybeSource <? extends T >> sources ) {
445- return Flowable .fromIterable (sources ).concatMapEagerDelayError ((Function )MaybeToPublisher .instance (), false );
437+ return Flowable .fromIterable (sources ).concatMapEager ((Function )MaybeToPublisher .instance (), StandardConcurrentBufferedConfig . DELAY_ERRORS_BOUNDARY );
446438 }
447439
448440 /**
@@ -474,11 +466,7 @@ public abstract class Maybe<@NonNull T> implements MaybeSource<T> {
474466 @ NonNull
475467 public static <@ NonNull T > Flowable <T > concatEager (@ NonNull Iterable <@ NonNull ? extends MaybeSource <? extends T >> sources ,
476468 @ NonNull StandardConcurrentBufferedConfig config ) {
477- Objects .requireNonNull (config , "config is null" );
478- if (config .delayErrors ()) {
479- return Flowable .fromIterable (sources ).concatMapEagerDelayError ((Function )MaybeToPublisher .instance (), true , config .maxConcurrency (), config .bufferSize ());
480- }
481- return Flowable .fromIterable (sources ).concatMapEager ((Function )MaybeToPublisher .instance (), config .maxConcurrency (), config .bufferSize ());
469+ return Flowable .fromIterable (sources ).concatMapEager ((Function )MaybeToPublisher .instance (), config );
482470 }
483471
484472 /**
@@ -543,11 +531,7 @@ public abstract class Maybe<@NonNull T> implements MaybeSource<T> {
543531 @ NonNull
544532 public static <@ NonNull T > Flowable <T > concatEager (@ NonNull Publisher <@ NonNull ? extends MaybeSource <? extends T >> sources ,
545533 @ NonNull StandardConcurrentBufferedConfig config ) {
546- Objects .requireNonNull (config , "config is null" );
547- if (config .delayErrors ()) {
548- return Flowable .fromPublisher (sources ).concatMapEagerDelayError ((Function )MaybeToPublisher .instance (), true , config .maxConcurrency (), config .bufferSize ());
549- }
550- return Flowable .fromPublisher (sources ).concatMapEager ((Function )MaybeToPublisher .instance (), config .maxConcurrency (), config .bufferSize ());
534+ return Flowable .fromPublisher (sources ).concatMapEager ((Function )MaybeToPublisher .instance (), config );
551535 }
552536
553537 /**
@@ -1086,7 +1070,7 @@ public abstract class Maybe<@NonNull T> implements MaybeSource<T> {
10861070 @ SchedulerSupport (SchedulerSupport .NONE )
10871071 @ NonNull
10881072 public static <@ NonNull T > Flowable <T > merge (@ NonNull Iterable <@ NonNull ? extends MaybeSource <? extends T >> sources ) {
1089- return Flowable .fromIterable (sources ).flatMapMaybe (Functions .identity (), false , Integer . MAX_VALUE );
1073+ return Flowable .fromIterable (sources ).flatMapMaybe (Functions .identity (), StandardConcurrentConfig . MAX_DEFAULT );
10901074 }
10911075
10921076 /**
@@ -1278,7 +1262,7 @@ public abstract class Maybe<@NonNull T> implements MaybeSource<T> {
12781262 public static <@ NonNull T > Flowable <T > mergeArray (@ NonNull StandardConcurrentConfig config , @ NonNull MaybeSource <? extends T >... sources ) {
12791263 Objects .requireNonNull (sources , "sources is null" );
12801264 Objects .requireNonNull (config , "config is null" );
1281- return Flowable .fromArray (sources ).flatMapMaybe (Functions .identity (), config . delayErrors (), config . maxConcurrency () );
1265+ return Flowable .fromArray (sources ).flatMapMaybe (Functions .identity (), config );
12821266 }
12831267
12841268 /**
@@ -1318,7 +1302,7 @@ public abstract class Maybe<@NonNull T> implements MaybeSource<T> {
13181302 @ NonNull
13191303 public static <@ NonNull T > Flowable <T > merge (@ NonNull Iterable <@ NonNull ? extends MaybeSource <? extends T >> sources , @ NonNull StandardConcurrentConfig config ) {
13201304 Objects .requireNonNull (config , "config is null" );
1321- return Flowable .fromIterable (sources ).flatMapMaybe (Functions .identity (), config . delayErrors (), config . maxConcurrency () );
1305+ return Flowable .fromIterable (sources ).flatMapMaybe (Functions .identity (), config );
13221306 }
13231307
13241308 /**
@@ -4478,7 +4462,7 @@ public final void safeSubscribe(@NonNull MaybeObserver<? super T> observer) {
44784462 @ BackpressureSupport (BackpressureKind .FULL )
44794463 public final Flowable <T > startWith (@ NonNull CompletableSource other ) {
44804464 Objects .requireNonNull (other , "other is null" );
4481- return Flowable .concat (Completable .wrap (other ).<T >toFlowable (), toFlowable ());
4465+ return Flowable .concatArray (Completable .wrap (other ).<T >toFlowable (), toFlowable ());
44824466 }
44834467
44844468 /**
@@ -4503,7 +4487,7 @@ public final Flowable<T> startWith(@NonNull CompletableSource other) {
45034487 @ BackpressureSupport (BackpressureKind .FULL )
45044488 public final Flowable <T > startWith (@ NonNull SingleSource <T > other ) {
45054489 Objects .requireNonNull (other , "other is null" );
4506- return Flowable .concat (Single .wrap (other ).toFlowable (), toFlowable ());
4490+ return Flowable .concatArray (Single .wrap (other ).toFlowable (), toFlowable ());
45074491 }
45084492
45094493 /**
@@ -4528,7 +4512,7 @@ public final Flowable<T> startWith(@NonNull SingleSource<T> other) {
45284512 @ BackpressureSupport (BackpressureKind .FULL )
45294513 public final Flowable <T > startWith (@ NonNull MaybeSource <T > other ) {
45304514 Objects .requireNonNull (other , "other is null" );
4531- return Flowable .concat (Maybe .wrap (other ).toFlowable (), toFlowable ());
4515+ return Flowable .concatArray (Maybe .wrap (other ).toFlowable (), toFlowable ());
45324516 }
45334517
45344518 /**
0 commit comments