From e01714947491049bfcfccdbc8989b6a27b7ba2be Mon Sep 17 00:00:00 2001 From: akarnokd Date: Sat, 17 Jul 2021 08:49:55 +0200 Subject: [PATCH] 3.x: API promotions for 3.1.0 --- src/main/java/io/reactivex/rxjava3/core/Flowable.java | 8 ++++---- .../internal/schedulers/SchedulerPoolFactory.java | 2 -- .../java/io/reactivex/rxjava3/plugins/RxJavaPlugins.java | 8 ++++---- .../io/reactivex/rxjava3/schedulers/TestScheduler.java | 9 ++++----- .../internal/schedulers/SchedulerPoolFactoryTest.java | 1 - 5 files changed, 12 insertions(+), 16 deletions(-) diff --git a/src/main/java/io/reactivex/rxjava3/core/Flowable.java b/src/main/java/io/reactivex/rxjava3/core/Flowable.java index a9f7b0a3b6..804a057533 100644 --- a/src/main/java/io/reactivex/rxjava3/core/Flowable.java +++ b/src/main/java/io/reactivex/rxjava3/core/Flowable.java @@ -12725,15 +12725,15 @@ public final Flowable onBackpressureLatest() { *
Scheduler:
*
{@code onBackpressureReduce} does not operate by default on a particular {@link Scheduler}.
* + *

History: 3.0.9 - experimental * @param reducer the bi-function to call when there is more than one non-emitted value to downstream, * the first argument of the bi-function is previous item and the second one is currently * emitting from upstream * @return the new {@code Flowable} instance * @throws NullPointerException if {@code reducer} is {@code null} - * @since 3.0.9 - experimental + * @since 3.1.0 * @see #onBackpressureReduce(Supplier, BiFunction) */ - @Experimental @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) @@ -12764,6 +12764,7 @@ public final Flowable onBackpressureReduce(@NonNull BiFunction reduc *

Scheduler:
*
{@code onBackpressureReduce} does not operate by default on a particular {@link Scheduler}.
* + *

History: 3.0.9 - experimental * @param the aggregate type emitted when the downstream requests more items * @param supplier the factory to call to create new item of type R to pass it as the first argument to {@code reducer}. * It is called when previous returned value by {@code reducer} already sent to @@ -12774,9 +12775,8 @@ public final Flowable onBackpressureReduce(@NonNull BiFunction reduc * @return the new {@code Flowable} instance * @throws NullPointerException if {@code supplier} or {@code reducer} is {@code null} * @see #onBackpressureReduce(BiFunction) - * @since 3.0.9 - experimental + * @since 3.1.0 */ - @Experimental @CheckReturnValue @BackpressureSupport(BackpressureKind.UNBOUNDED_IN) @SchedulerSupport(SchedulerSupport.NONE) diff --git a/src/main/java/io/reactivex/rxjava3/internal/schedulers/SchedulerPoolFactory.java b/src/main/java/io/reactivex/rxjava3/internal/schedulers/SchedulerPoolFactory.java index 515c2f2061..44a824a168 100644 --- a/src/main/java/io/reactivex/rxjava3/internal/schedulers/SchedulerPoolFactory.java +++ b/src/main/java/io/reactivex/rxjava3/internal/schedulers/SchedulerPoolFactory.java @@ -13,9 +13,7 @@ package io.reactivex.rxjava3.internal.schedulers; -import java.util.*; import java.util.concurrent.*; -import java.util.concurrent.atomic.AtomicReference; import io.reactivex.rxjava3.exceptions.Exceptions; import io.reactivex.rxjava3.functions.Function; diff --git a/src/main/java/io/reactivex/rxjava3/plugins/RxJavaPlugins.java b/src/main/java/io/reactivex/rxjava3/plugins/RxJavaPlugins.java index c5b0797ba3..58cb730bf6 100644 --- a/src/main/java/io/reactivex/rxjava3/plugins/RxJavaPlugins.java +++ b/src/main/java/io/reactivex/rxjava3/plugins/RxJavaPlugins.java @@ -1153,11 +1153,11 @@ public static void setOnParallelAssembly(@Nullable FunctionHistory: 3.0.11 - experimental * @param handler the hook function to set, null allowed - * @since 3.0.11 - experimental + * @since 3.1.0 */ @SuppressWarnings("rawtypes") - @Experimental public static void setOnParallelSubscribe(@Nullable BiFunction handler) { if (lockdown) { throw new IllegalStateException("Plugins can't be changed anymore"); @@ -1167,11 +1167,11 @@ public static void setOnParallelSubscribe(@Nullable BiFunctionHistory: 3.0.11 - experimental * @return the hook function, may be null - * @since 3.0.11 - experimental + * @since 3.1.0 */ @SuppressWarnings("rawtypes") - @Experimental @Nullable public static BiFunction getOnParallelSubscribe() { return onParallelSubscribe; diff --git a/src/main/java/io/reactivex/rxjava3/schedulers/TestScheduler.java b/src/main/java/io/reactivex/rxjava3/schedulers/TestScheduler.java index a9aa3285f5..33aca58a48 100644 --- a/src/main/java/io/reactivex/rxjava3/schedulers/TestScheduler.java +++ b/src/main/java/io/reactivex/rxjava3/schedulers/TestScheduler.java @@ -52,12 +52,12 @@ public TestScheduler() { /** * Creates a new TestScheduler with the option to use the * {@link RxJavaPlugins#onSchedule(Runnable)} hook when scheduling tasks. + *

History: 3.0.10 - experimental * @param useOnScheduleHook if {@code true}, the tasks submitted to this * TestScheduler is wrapped via the * {@link RxJavaPlugins#onSchedule(Runnable)} hook - * @since 3.0.10 - experimental + * @since 3.1.0 */ - @Experimental public TestScheduler(boolean useOnScheduleHook) { this.useOnScheduleHook = useOnScheduleHook; } @@ -78,7 +78,7 @@ public TestScheduler(long delayTime, TimeUnit unit) { * Creates a new TestScheduler with the specified initial virtual time * and with the option to use the * {@link RxJavaPlugins#onSchedule(Runnable)} hook when scheduling tasks. - * + *

History: 3.0.10 - experimental * @param delayTime * the point in time to move the Scheduler's clock to * @param unit @@ -86,9 +86,8 @@ public TestScheduler(long delayTime, TimeUnit unit) { * @param useOnScheduleHook if {@code true}, the tasks submitted to this * TestScheduler is wrapped via the * {@link RxJavaPlugins#onSchedule(Runnable)} hook - * @since 3.0.10 - experimental + * @since 3.1.0 */ - @Experimental public TestScheduler(long delayTime, TimeUnit unit, boolean useOnScheduleHook) { time = unit.toNanos(delayTime); this.useOnScheduleHook = useOnScheduleHook; diff --git a/src/test/java/io/reactivex/rxjava3/internal/schedulers/SchedulerPoolFactoryTest.java b/src/test/java/io/reactivex/rxjava3/internal/schedulers/SchedulerPoolFactoryTest.java index 5d93dabc09..12afa708c4 100644 --- a/src/test/java/io/reactivex/rxjava3/internal/schedulers/SchedulerPoolFactoryTest.java +++ b/src/test/java/io/reactivex/rxjava3/internal/schedulers/SchedulerPoolFactoryTest.java @@ -20,7 +20,6 @@ import io.reactivex.rxjava3.core.RxJavaTest; import io.reactivex.rxjava3.functions.Function; import io.reactivex.rxjava3.internal.functions.Functions; -import io.reactivex.rxjava3.schedulers.Schedulers; import io.reactivex.rxjava3.testsupport.TestHelper; public class SchedulerPoolFactoryTest extends RxJavaTest {