diff --git a/android/guava/src/com/google/common/util/concurrent/FluentFuture.java b/android/guava/src/com/google/common/util/concurrent/FluentFuture.java index 2b6ef9f557f2..683944c9e557 100644 --- a/android/guava/src/com/google/common/util/concurrent/FluentFuture.java +++ b/android/guava/src/com/google/common/util/concurrent/FluentFuture.java @@ -70,7 +70,6 @@ * * @since 23.0 */ -@Beta @DoNotMock("Use FluentFuture.from(Futures.immediate*Future) or SettableFuture") @GwtCompatible(emulated = true) @ElementTypesAreNonnullByDefault @@ -184,6 +183,7 @@ public final boolean cancel(boolean mayInterruptIfRunning) { * @param executor the executor that runs {@code fallback} if the input fails */ @Partially.GwtIncompatible("AVAILABLE but requires exceptionType to be Throwable.class") + @Beta public final FluentFuture catching( Class exceptionType, Function fallback, Executor executor) { return (FluentFuture) Futures.catching(this, exceptionType, fallback, executor); @@ -248,6 +248,7 @@ public final FluentFuture catching( * @param executor the executor that runs {@code fallback} if the input fails */ @Partially.GwtIncompatible("AVAILABLE but requires exceptionType to be Throwable.class") + @Beta public final FluentFuture catchingAsync( Class exceptionType, AsyncFunction fallback, Executor executor) { return (FluentFuture) Futures.catchingAsync(this, exceptionType, fallback, executor); @@ -265,6 +266,7 @@ public final FluentFuture catchingAsync( */ @GwtIncompatible // ScheduledExecutorService @SuppressWarnings("GoodTime") // should accept a java.time.Duration + @Beta public final FluentFuture withTimeout( long timeout, TimeUnit unit, ScheduledExecutorService scheduledExecutor) { return (FluentFuture) Futures.withTimeout(this, timeout, unit, scheduledExecutor); @@ -309,6 +311,7 @@ public final FluentFuture withTimeout( * @return A future that holds result of the function (if the input succeeded) or the original * input's failure (if not) */ + @Beta public final FluentFuture transformAsync( AsyncFunction function, Executor executor) { return (FluentFuture) Futures.transformAsync(this, function, executor); @@ -346,6 +349,7 @@ public final FluentFuture withTimeout( * @param executor Executor to run the function in. * @return A future that holds result of the transformation. */ + @Beta public final FluentFuture transform( Function function, Executor executor) { return (FluentFuture) Futures.transform(this, function, executor); diff --git a/guava/src/com/google/common/util/concurrent/FluentFuture.java b/guava/src/com/google/common/util/concurrent/FluentFuture.java index 4320b78b9e97..b47e67927f08 100644 --- a/guava/src/com/google/common/util/concurrent/FluentFuture.java +++ b/guava/src/com/google/common/util/concurrent/FluentFuture.java @@ -72,7 +72,6 @@ * * @since 23.0 */ -@Beta @DoNotMock("Use FluentFuture.from(Futures.immediate*Future) or SettableFuture") @GwtCompatible(emulated = true) @ElementTypesAreNonnullByDefault @@ -186,6 +185,7 @@ public final boolean cancel(boolean mayInterruptIfRunning) { * @param executor the executor that runs {@code fallback} if the input fails */ @Partially.GwtIncompatible("AVAILABLE but requires exceptionType to be Throwable.class") + @Beta public final FluentFuture catching( Class exceptionType, Function fallback, Executor executor) { return (FluentFuture) Futures.catching(this, exceptionType, fallback, executor); @@ -250,6 +250,7 @@ public final FluentFuture catching( * @param executor the executor that runs {@code fallback} if the input fails */ @Partially.GwtIncompatible("AVAILABLE but requires exceptionType to be Throwable.class") + @Beta public final FluentFuture catchingAsync( Class exceptionType, AsyncFunction fallback, Executor executor) { return (FluentFuture) Futures.catchingAsync(this, exceptionType, fallback, executor); @@ -266,6 +267,7 @@ public final FluentFuture catchingAsync( * @since 28.0 */ @GwtIncompatible // ScheduledExecutorService + @Beta public final FluentFuture withTimeout( Duration timeout, ScheduledExecutorService scheduledExecutor) { return withTimeout(toNanosSaturated(timeout), TimeUnit.NANOSECONDS, scheduledExecutor); @@ -283,6 +285,7 @@ public final FluentFuture withTimeout( */ @GwtIncompatible // ScheduledExecutorService @SuppressWarnings("GoodTime") // should accept a java.time.Duration + @Beta public final FluentFuture withTimeout( long timeout, TimeUnit unit, ScheduledExecutorService scheduledExecutor) { return (FluentFuture) Futures.withTimeout(this, timeout, unit, scheduledExecutor); @@ -327,6 +330,7 @@ public final FluentFuture withTimeout( * @return A future that holds result of the function (if the input succeeded) or the original * input's failure (if not) */ + @Beta public final FluentFuture transformAsync( AsyncFunction function, Executor executor) { return (FluentFuture) Futures.transformAsync(this, function, executor); @@ -364,6 +368,7 @@ public final FluentFuture withTimeout( * @param executor Executor to run the function in. * @return A future that holds result of the transformation. */ + @Beta public final FluentFuture transform( Function function, Executor executor) { return (FluentFuture) Futures.transform(this, function, executor);