Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove @Beta from the FluentFuture type, its factory methods, and addCallback. #5821

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
*
* @since 23.0
*/
@Beta
@DoNotMock("Use FluentFuture.from(Futures.immediate*Future) or SettableFuture")
@GwtCompatible(emulated = true)
@ElementTypesAreNonnullByDefault
Expand Down Expand Up @@ -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 <X extends Throwable> FluentFuture<V> catching(
Class<X> exceptionType, Function<? super X, ? extends V> fallback, Executor executor) {
return (FluentFuture<V>) Futures.catching(this, exceptionType, fallback, executor);
Expand Down Expand Up @@ -248,6 +248,7 @@ public final <X extends Throwable> FluentFuture<V> 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 <X extends Throwable> FluentFuture<V> catchingAsync(
Class<X> exceptionType, AsyncFunction<? super X, ? extends V> fallback, Executor executor) {
return (FluentFuture<V>) Futures.catchingAsync(this, exceptionType, fallback, executor);
Expand All @@ -265,6 +266,7 @@ public final <X extends Throwable> FluentFuture<V> catchingAsync(
*/
@GwtIncompatible // ScheduledExecutorService
@SuppressWarnings("GoodTime") // should accept a java.time.Duration
@Beta
public final FluentFuture<V> withTimeout(
long timeout, TimeUnit unit, ScheduledExecutorService scheduledExecutor) {
return (FluentFuture<V>) Futures.withTimeout(this, timeout, unit, scheduledExecutor);
Expand Down Expand Up @@ -309,6 +311,7 @@ public final FluentFuture<V> 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 <T extends @Nullable Object> FluentFuture<T> transformAsync(
AsyncFunction<? super V, T> function, Executor executor) {
return (FluentFuture<T>) Futures.transformAsync(this, function, executor);
Expand Down Expand Up @@ -346,6 +349,7 @@ public final FluentFuture<V> withTimeout(
* @param executor Executor to run the function in.
* @return A future that holds result of the transformation.
*/
@Beta
public final <T extends @Nullable Object> FluentFuture<T> transform(
Function<? super V, T> function, Executor executor) {
return (FluentFuture<T>) Futures.transform(this, function, executor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
*
* @since 23.0
*/
@Beta
@DoNotMock("Use FluentFuture.from(Futures.immediate*Future) or SettableFuture")
@GwtCompatible(emulated = true)
@ElementTypesAreNonnullByDefault
Expand Down Expand Up @@ -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 <X extends Throwable> FluentFuture<V> catching(
Class<X> exceptionType, Function<? super X, ? extends V> fallback, Executor executor) {
return (FluentFuture<V>) Futures.catching(this, exceptionType, fallback, executor);
Expand Down Expand Up @@ -250,6 +250,7 @@ public final <X extends Throwable> FluentFuture<V> 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 <X extends Throwable> FluentFuture<V> catchingAsync(
Class<X> exceptionType, AsyncFunction<? super X, ? extends V> fallback, Executor executor) {
return (FluentFuture<V>) Futures.catchingAsync(this, exceptionType, fallback, executor);
Expand All @@ -266,6 +267,7 @@ public final <X extends Throwable> FluentFuture<V> catchingAsync(
* @since 28.0
*/
@GwtIncompatible // ScheduledExecutorService
@Beta
public final FluentFuture<V> withTimeout(
Duration timeout, ScheduledExecutorService scheduledExecutor) {
return withTimeout(toNanosSaturated(timeout), TimeUnit.NANOSECONDS, scheduledExecutor);
Expand All @@ -283,6 +285,7 @@ public final FluentFuture<V> withTimeout(
*/
@GwtIncompatible // ScheduledExecutorService
@SuppressWarnings("GoodTime") // should accept a java.time.Duration
@Beta
public final FluentFuture<V> withTimeout(
long timeout, TimeUnit unit, ScheduledExecutorService scheduledExecutor) {
return (FluentFuture<V>) Futures.withTimeout(this, timeout, unit, scheduledExecutor);
Expand Down Expand Up @@ -327,6 +330,7 @@ public final FluentFuture<V> 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 <T extends @Nullable Object> FluentFuture<T> transformAsync(
AsyncFunction<? super V, T> function, Executor executor) {
return (FluentFuture<T>) Futures.transformAsync(this, function, executor);
Expand Down Expand Up @@ -364,6 +368,7 @@ public final FluentFuture<V> withTimeout(
* @param executor Executor to run the function in.
* @return A future that holds result of the transformation.
*/
@Beta
public final <T extends @Nullable Object> FluentFuture<T> transform(
Function<? super V, T> function, Executor executor) {
return (FluentFuture<T>) Futures.transform(this, function, executor);
Expand Down