Skip to content

Commit 15a0c9f

Browse files
klueverGoogle Java Core Libraries
authored and
Google Java Core Libraries
committedApr 11, 2023
Remove @Beta from Futures.
Fixes #3403 #1519 #1421 #3424 RELNOTES=`concurrent`: Remove `@Beta` from `Futures`. PiperOrigin-RevId: 523465435
1 parent aadc99d commit 15a0c9f

File tree

2 files changed

+0
-38
lines changed

2 files changed

+0
-38
lines changed
 

‎android/guava/src/com/google/common/util/concurrent/Futures.java

-18
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import static com.google.common.util.concurrent.Uninterruptibles.getUninterruptibly;
2121
import static java.util.Objects.requireNonNull;
2222

23-
import com.google.common.annotations.Beta;
2423
import com.google.common.annotations.GwtCompatible;
2524
import com.google.common.annotations.GwtIncompatible;
2625
import com.google.common.annotations.J2ktIncompatible;
@@ -283,7 +282,6 @@ public void run() {
283282
* @param executor the executor that runs {@code fallback} if {@code input} fails
284283
* @since 19.0
285284
*/
286-
@Beta
287285
@J2ktIncompatible
288286
@Partially.GwtIncompatible("AVAILABLE but requires exceptionType to be Throwable.class")
289287
public static <V extends @Nullable Object, X extends Throwable> ListenableFuture<V> catching(
@@ -349,7 +347,6 @@ public void run() {
349347
* @param executor the executor that runs {@code fallback} if {@code input} fails
350348
* @since 19.0 (similar functionality in 14.0 as {@code withFallback})
351349
*/
352-
@Beta
353350
@J2ktIncompatible
354351
@Partially.GwtIncompatible("AVAILABLE but requires exceptionType to be Throwable.class")
355352
public static <V extends @Nullable Object, X extends Throwable> ListenableFuture<V> catchingAsync(
@@ -371,7 +368,6 @@ public void run() {
371368
* @param scheduledExecutor The executor service to enforce the timeout.
372369
* @since 19.0
373370
*/
374-
@Beta
375371
@J2ktIncompatible
376372
@GwtIncompatible // java.util.concurrent.ScheduledExecutorService
377373
@SuppressWarnings("GoodTime") // should accept a java.time.Duration
@@ -418,7 +414,6 @@ public void run() {
418414
* input's failure (if not)
419415
* @since 19.0 (in 11.0 as {@code transform})
420416
*/
421-
@Beta
422417
public static <I extends @Nullable Object, O extends @Nullable Object>
423418
ListenableFuture<O> transformAsync(
424419
ListenableFuture<I> input,
@@ -456,7 +451,6 @@ ListenableFuture<O> transformAsync(
456451
* @return A future that holds result of the transformation.
457452
* @since 9.0 (in 2.0 as {@code compose})
458453
*/
459-
@Beta
460454
public static <I extends @Nullable Object, O extends @Nullable Object>
461455
ListenableFuture<O> transform(
462456
ListenableFuture<I> input, Function<? super I, ? extends O> function, Executor executor) {
@@ -483,7 +477,6 @@ ListenableFuture<O> transform(
483477
* @return A future that returns the result of the transformation.
484478
* @since 10.0
485479
*/
486-
@Beta
487480
@J2ktIncompatible
488481
@GwtIncompatible // TODO
489482
public static <I extends @Nullable Object, O extends @Nullable Object> Future<O> lazyTransform(
@@ -544,7 +537,6 @@ private O applyTransformation(I input) throws ExecutionException {
544537
* @return a future that provides a list of the results of the component futures
545538
* @since 10.0
546539
*/
547-
@Beta
548540
@SafeVarargs
549541
public static <V extends @Nullable Object> ListenableFuture<List<V>> allAsList(
550542
ListenableFuture<? extends V>... futures) {
@@ -572,7 +564,6 @@ private O applyTransformation(I input) throws ExecutionException {
572564
* @return a future that provides a list of the results of the component futures
573565
* @since 10.0
574566
*/
575-
@Beta
576567
public static <V extends @Nullable Object> ListenableFuture<List<V>> allAsList(
577568
Iterable<? extends ListenableFuture<? extends V>> futures) {
578569
ListenableFuture<List<@Nullable V>> nullable =
@@ -591,7 +582,6 @@ private O applyTransformation(I input) throws ExecutionException {
591582
*
592583
* @since 20.0
593584
*/
594-
@Beta
595585
@SafeVarargs
596586
public static <V extends @Nullable Object> FutureCombiner<V> whenAllComplete(
597587
ListenableFuture<? extends V>... futures) {
@@ -606,7 +596,6 @@ private O applyTransformation(I input) throws ExecutionException {
606596
*
607597
* @since 20.0
608598
*/
609-
@Beta
610599
public static <V extends @Nullable Object> FutureCombiner<V> whenAllComplete(
611600
Iterable<? extends ListenableFuture<? extends V>> futures) {
612601
return new FutureCombiner<V>(false, ImmutableList.copyOf(futures));
@@ -619,7 +608,6 @@ private O applyTransformation(I input) throws ExecutionException {
619608
*
620609
* @since 20.0
621610
*/
622-
@Beta
623611
@SafeVarargs
624612
public static <V extends @Nullable Object> FutureCombiner<V> whenAllSucceed(
625613
ListenableFuture<? extends V>... futures) {
@@ -633,7 +621,6 @@ private O applyTransformation(I input) throws ExecutionException {
633621
*
634622
* @since 20.0
635623
*/
636-
@Beta
637624
public static <V extends @Nullable Object> FutureCombiner<V> whenAllSucceed(
638625
Iterable<? extends ListenableFuture<? extends V>> futures) {
639626
return new FutureCombiner<V>(true, ImmutableList.copyOf(futures));
@@ -665,7 +652,6 @@ private O applyTransformation(I input) throws ExecutionException {
665652
*
666653
* @since 20.0
667654
*/
668-
@Beta
669655
@GwtCompatible
670656
public static final class FutureCombiner<V extends @Nullable Object> {
671657
private final boolean allMustSucceed;
@@ -827,7 +813,6 @@ protected void afterDone() {
827813
* @return a future that provides a list of the results of the component futures
828814
* @since 10.0
829815
*/
830-
@Beta
831816
@SafeVarargs
832817
public static <V extends @Nullable Object> ListenableFuture<List<@Nullable V>> successfulAsList(
833818
ListenableFuture<? extends V>... futures) {
@@ -864,7 +849,6 @@ protected void afterDone() {
864849
* @return a future that provides a list of the results of the component futures
865850
* @since 10.0
866851
*/
867-
@Beta
868852
public static <V extends @Nullable Object> ListenableFuture<List<@Nullable V>> successfulAsList(
869853
Iterable<? extends ListenableFuture<? extends V>> futures) {
870854
return new ListFuture<V>(ImmutableList.copyOf(futures), false);
@@ -1210,7 +1194,6 @@ public String toString() {
12101194
* does not have a suitable constructor
12111195
* @since 19.0 (in 10.0 as {@code get})
12121196
*/
1213-
@Beta
12141197
@CanIgnoreReturnValue
12151198
@J2ktIncompatible
12161199
@GwtIncompatible // reflection
@@ -1263,7 +1246,6 @@ public String toString() {
12631246
* does not have a suitable constructor
12641247
* @since 19.0 (in 10.0 as {@code get} and with different parameter order)
12651248
*/
1266-
@Beta
12671249
@CanIgnoreReturnValue
12681250
@J2ktIncompatible
12691251
@GwtIncompatible // reflection

‎guava/src/com/google/common/util/concurrent/Futures.java

-20
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import static com.google.common.util.concurrent.Uninterruptibles.getUninterruptibly;
2222
import static java.util.Objects.requireNonNull;
2323

24-
import com.google.common.annotations.Beta;
2524
import com.google.common.annotations.GwtCompatible;
2625
import com.google.common.annotations.GwtIncompatible;
2726
import com.google.common.annotations.J2ktIncompatible;
@@ -299,7 +298,6 @@ public void run() {
299298
* @param executor the executor that runs {@code fallback} if {@code input} fails
300299
* @since 19.0
301300
*/
302-
@Beta
303301
@J2ktIncompatible
304302
@Partially.GwtIncompatible("AVAILABLE but requires exceptionType to be Throwable.class")
305303
public static <V extends @Nullable Object, X extends Throwable> ListenableFuture<V> catching(
@@ -365,7 +363,6 @@ public void run() {
365363
* @param executor the executor that runs {@code fallback} if {@code input} fails
366364
* @since 19.0 (similar functionality in 14.0 as {@code withFallback})
367365
*/
368-
@Beta
369366
@J2ktIncompatible
370367
@Partially.GwtIncompatible("AVAILABLE but requires exceptionType to be Throwable.class")
371368
public static <V extends @Nullable Object, X extends Throwable> ListenableFuture<V> catchingAsync(
@@ -387,7 +384,6 @@ public void run() {
387384
* @param scheduledExecutor The executor service to enforce the timeout.
388385
* @since 28.0
389386
*/
390-
@Beta
391387
@J2ktIncompatible
392388
@GwtIncompatible // java.util.concurrent.ScheduledExecutorService
393389
public static <V extends @Nullable Object> ListenableFuture<V> withTimeout(
@@ -407,7 +403,6 @@ public void run() {
407403
* @param scheduledExecutor The executor service to enforce the timeout.
408404
* @since 19.0
409405
*/
410-
@Beta
411406
@J2ktIncompatible
412407
@GwtIncompatible // java.util.concurrent.ScheduledExecutorService
413408
@SuppressWarnings("GoodTime") // should accept a java.time.Duration
@@ -454,7 +449,6 @@ public void run() {
454449
* input's failure (if not)
455450
* @since 19.0 (in 11.0 as {@code transform})
456451
*/
457-
@Beta
458452
public static <I extends @Nullable Object, O extends @Nullable Object>
459453
ListenableFuture<O> transformAsync(
460454
ListenableFuture<I> input,
@@ -492,7 +486,6 @@ ListenableFuture<O> transformAsync(
492486
* @return A future that holds result of the transformation.
493487
* @since 9.0 (in 2.0 as {@code compose})
494488
*/
495-
@Beta
496489
public static <I extends @Nullable Object, O extends @Nullable Object>
497490
ListenableFuture<O> transform(
498491
ListenableFuture<I> input, Function<? super I, ? extends O> function, Executor executor) {
@@ -519,7 +512,6 @@ ListenableFuture<O> transform(
519512
* @return A future that returns the result of the transformation.
520513
* @since 10.0
521514
*/
522-
@Beta
523515
@J2ktIncompatible
524516
@GwtIncompatible // TODO
525517
public static <I extends @Nullable Object, O extends @Nullable Object> Future<O> lazyTransform(
@@ -580,7 +572,6 @@ private O applyTransformation(I input) throws ExecutionException {
580572
* @return a future that provides a list of the results of the component futures
581573
* @since 10.0
582574
*/
583-
@Beta
584575
@SafeVarargs
585576
public static <V extends @Nullable Object> ListenableFuture<List<V>> allAsList(
586577
ListenableFuture<? extends V>... futures) {
@@ -608,7 +599,6 @@ private O applyTransformation(I input) throws ExecutionException {
608599
* @return a future that provides a list of the results of the component futures
609600
* @since 10.0
610601
*/
611-
@Beta
612602
public static <V extends @Nullable Object> ListenableFuture<List<V>> allAsList(
613603
Iterable<? extends ListenableFuture<? extends V>> futures) {
614604
ListenableFuture<List<@Nullable V>> nullable =
@@ -627,7 +617,6 @@ private O applyTransformation(I input) throws ExecutionException {
627617
*
628618
* @since 20.0
629619
*/
630-
@Beta
631620
@SafeVarargs
632621
public static <V extends @Nullable Object> FutureCombiner<V> whenAllComplete(
633622
ListenableFuture<? extends V>... futures) {
@@ -642,7 +631,6 @@ private O applyTransformation(I input) throws ExecutionException {
642631
*
643632
* @since 20.0
644633
*/
645-
@Beta
646634
public static <V extends @Nullable Object> FutureCombiner<V> whenAllComplete(
647635
Iterable<? extends ListenableFuture<? extends V>> futures) {
648636
return new FutureCombiner<V>(false, ImmutableList.copyOf(futures));
@@ -655,7 +643,6 @@ private O applyTransformation(I input) throws ExecutionException {
655643
*
656644
* @since 20.0
657645
*/
658-
@Beta
659646
@SafeVarargs
660647
public static <V extends @Nullable Object> FutureCombiner<V> whenAllSucceed(
661648
ListenableFuture<? extends V>... futures) {
@@ -669,7 +656,6 @@ private O applyTransformation(I input) throws ExecutionException {
669656
*
670657
* @since 20.0
671658
*/
672-
@Beta
673659
public static <V extends @Nullable Object> FutureCombiner<V> whenAllSucceed(
674660
Iterable<? extends ListenableFuture<? extends V>> futures) {
675661
return new FutureCombiner<V>(true, ImmutableList.copyOf(futures));
@@ -701,7 +687,6 @@ private O applyTransformation(I input) throws ExecutionException {
701687
*
702688
* @since 20.0
703689
*/
704-
@Beta
705690
@GwtCompatible
706691
public static final class FutureCombiner<V extends @Nullable Object> {
707692
private final boolean allMustSucceed;
@@ -863,7 +848,6 @@ protected void afterDone() {
863848
* @return a future that provides a list of the results of the component futures
864849
* @since 10.0
865850
*/
866-
@Beta
867851
@SafeVarargs
868852
public static <V extends @Nullable Object> ListenableFuture<List<@Nullable V>> successfulAsList(
869853
ListenableFuture<? extends V>... futures) {
@@ -900,7 +884,6 @@ protected void afterDone() {
900884
* @return a future that provides a list of the results of the component futures
901885
* @since 10.0
902886
*/
903-
@Beta
904887
public static <V extends @Nullable Object> ListenableFuture<List<@Nullable V>> successfulAsList(
905888
Iterable<? extends ListenableFuture<? extends V>> futures) {
906889
return new ListFuture<V>(ImmutableList.copyOf(futures), false);
@@ -1246,7 +1229,6 @@ public String toString() {
12461229
* does not have a suitable constructor
12471230
* @since 19.0 (in 10.0 as {@code get})
12481231
*/
1249-
@Beta
12501232
@CanIgnoreReturnValue
12511233
@J2ktIncompatible
12521234
@GwtIncompatible // reflection
@@ -1299,7 +1281,6 @@ public String toString() {
12991281
* does not have a suitable constructor
13001282
* @since 28.0
13011283
*/
1302-
@Beta
13031284
@CanIgnoreReturnValue
13041285
@J2ktIncompatible
13051286
@GwtIncompatible // reflection
@@ -1352,7 +1333,6 @@ public String toString() {
13521333
* does not have a suitable constructor
13531334
* @since 19.0 (in 10.0 as {@code get} and with different parameter order)
13541335
*/
1355-
@Beta
13561336
@CanIgnoreReturnValue
13571337
@J2ktIncompatible
13581338
@GwtIncompatible // reflection

0 commit comments

Comments
 (0)
Please sign in to comment.