Skip to content

Commit 42ca8c4

Browse files
authored
2.x: cleanup, fixes, coverage 10/20-1 (#4736)
1 parent 869c855 commit 42ca8c4

File tree

60 files changed

+2275
-469
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+2275
-469
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6139,7 +6139,7 @@ public final <B, U extends Collection<? super T>> Flowable<U> buffer(Callable<?
61396139
@BackpressureSupport(BackpressureKind.FULL)
61406140
@SchedulerSupport(SchedulerSupport.NONE)
61416141
public final Flowable<T> cache() {
6142-
return FlowableCache.from(this);
6142+
return cacheWithInitialCapacity(16);
61436143
}
61446144

61456145
/**
@@ -6201,7 +6201,7 @@ public final Flowable<T> cache() {
62016201
@SchedulerSupport(SchedulerSupport.NONE)
62026202
public final Flowable<T> cacheWithInitialCapacity(int initialCapacity) {
62036203
ObjectHelper.verifyPositive(initialCapacity, "initialCapacity");
6204-
return FlowableCache.from(this, initialCapacity);
6204+
return RxJavaPlugins.onAssembly(new FlowableCache<T>(this, initialCapacity));
62056205
}
62066206

62076207
/**
@@ -6466,7 +6466,7 @@ public final <R> Flowable<R> concatMapDelayError(Function<? super T, ? extends P
64666466
return FlowableScalarXMap.scalarXMap(v, mapper);
64676467
}
64686468
ObjectHelper.verifyPositive(prefetch, "prefetch");
6469-
return RxJavaPlugins.onAssembly(new FlowableConcatMap<T, R>(this, mapper, prefetch, tillTheEnd ? ErrorMode.END : ErrorMode.IMMEDIATE));
6469+
return RxJavaPlugins.onAssembly(new FlowableConcatMap<T, R>(this, mapper, prefetch, tillTheEnd ? ErrorMode.END : ErrorMode.BOUNDARY));
64706470
}
64716471

64726472

@@ -9633,13 +9633,13 @@ public final Flowable<T> onBackpressureBuffer(int capacity, Action onOverflow) {
96339633
* @param capacity number of slots available in the buffer.
96349634
* @param onOverflow action to execute if an item needs to be buffered, but there are no available slots. Null is allowed.
96359635
* @param overflowStrategy how should the {@code Publisher} react to buffer overflows. Null is not allowed.
9636-
* @return the source {@code Publisher} modified to buffer items up to the given capacity
9636+
* @return the source {@code Flowable} modified to buffer items up to the given capacity
96379637
* @see <a href="http://reactivex.io/documentation/operators/backpressure.html">ReactiveX operators documentation: backpressure operators</a>
96389638
* @since 2.0
96399639
*/
96409640
@BackpressureSupport(BackpressureKind.SPECIAL)
96419641
@SchedulerSupport(SchedulerSupport.NONE)
9642-
public final Publisher<T> onBackpressureBuffer(long capacity, Action onOverflow, BackpressureOverflowStrategy overflowStrategy) {
9642+
public final Flowable<T> onBackpressureBuffer(long capacity, Action onOverflow, BackpressureOverflowStrategy overflowStrategy) {
96439643
ObjectHelper.requireNonNull(overflowStrategy, "strategy is null");
96449644
ObjectHelper.verifyPositive(capacity, "capacity");
96459645
return RxJavaPlugins.onAssembly(new FlowableOnBackpressureBufferStrategy<T>(this, capacity, onOverflow, overflowStrategy));

0 commit comments

Comments
 (0)