Skip to content

Commit bbaf76a

Browse files
klueverGoogle Java Core Libraries
authored and
Google Java Core Libraries
committedMay 12, 2023
Remove @Beta from various concurrent APIs.
RELNOTES=`concurrent`: Remove `@Beta` from various `concurrent` APIs. PiperOrigin-RevId: 531559865
1 parent 74ad9b8 commit bbaf76a

24 files changed

+1
-56
lines changed
 

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

-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
import static com.google.common.util.concurrent.Platform.restoreInterruptIfIsInterruptedException;
1818

19-
import com.google.common.annotations.Beta;
2019
import com.google.common.annotations.GwtIncompatible;
2120
import com.google.common.annotations.J2ktIncompatible;
2221
import com.google.errorprone.annotations.CanIgnoreReturnValue;
@@ -142,7 +141,6 @@ protected void shutDown() throws Exception {}
142141
* implementing {@code stopping}. Note, however, that {@code stopping} does not run at exactly the
143142
* same times as {@code triggerShutdown}.
144143
*/
145-
@Beta
146144
protected void triggerShutdown() {}
147145

148146
/**

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

-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import static java.util.Objects.requireNonNull;
2222
import static java.util.concurrent.atomic.AtomicReferenceFieldUpdater.newUpdater;
2323

24-
import com.google.common.annotations.Beta;
2524
import com.google.common.annotations.GwtCompatible;
2625
import com.google.common.base.Strings;
2726
import com.google.common.util.concurrent.internal.InternalFutureFailureAccess;
@@ -1071,7 +1070,6 @@ private static void complete(AbstractFuture<?> param, boolean callInterruptTask)
10711070
*
10721071
* @since 20.0
10731072
*/
1074-
@Beta
10751073
@ForOverride
10761074
protected void afterDone() {}
10771075

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

-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
package com.google.common.util.concurrent;
1616

17-
import com.google.common.annotations.Beta;
1817
import com.google.common.annotations.GwtIncompatible;
1918
import com.google.common.annotations.J2ktIncompatible;
2019
import com.google.errorprone.annotations.CanIgnoreReturnValue;
@@ -36,7 +35,6 @@
3635
* @since 14.0
3736
*/
3837
@CheckReturnValue
39-
@Beta
4038
@GwtIncompatible
4139
@J2ktIncompatible
4240
@ElementTypesAreNonnullByDefault

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

-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import static com.google.common.util.concurrent.Service.State.TERMINATED;
2727
import static java.util.Objects.requireNonNull;
2828

29-
import com.google.common.annotations.Beta;
3029
import com.google.common.annotations.GwtIncompatible;
3130
import com.google.common.annotations.J2ktIncompatible;
3231
import com.google.common.util.concurrent.Monitor.Guard;
@@ -239,7 +238,6 @@ protected AbstractService() {}
239238
*
240239
* @since 27.0
241240
*/
242-
@Beta
243241
@ForOverride
244242
protected void doCancelStart() {}
245243

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

-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
import static com.google.common.base.Preconditions.checkNotNull;
1818

19-
import com.google.common.annotations.Beta;
2019
import com.google.common.annotations.GwtCompatible;
2120
import com.google.common.annotations.J2ktIncompatible;
2221
import com.google.common.base.Function;
@@ -294,7 +293,6 @@ boolean remove(K key, long value) {
294293
*
295294
* @since 20.0
296295
*/
297-
@Beta
298296
@CanIgnoreReturnValue
299297
public boolean removeIfZero(K key) {
300298
return remove(key, 0);

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

-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
import static com.google.common.base.Preconditions.checkNotNull;
1818

19-
import com.google.common.annotations.Beta;
2019
import com.google.common.annotations.GwtCompatible;
2120
import com.google.common.annotations.GwtIncompatible;
2221
import com.google.common.annotations.J2ktIncompatible;
@@ -48,7 +47,6 @@ private Callables() {}
4847
*
4948
* @since 20.0
5049
*/
51-
@Beta
5250
@J2ktIncompatible
5351
@GwtIncompatible
5452
public static <T extends @Nullable Object> AsyncCallable<T> asAsyncCallable(

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

-6
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import static com.google.common.base.Preconditions.checkNotNull;
1818
import static java.util.Objects.requireNonNull;
1919

20-
import com.google.common.annotations.Beta;
2120
import com.google.common.annotations.GwtIncompatible;
2221
import com.google.common.annotations.J2ktIncompatible;
2322
import com.google.common.annotations.VisibleForTesting;
@@ -160,7 +159,6 @@
160159
* @author Darick Tong
161160
* @since 13.0
162161
*/
163-
@Beta
164162
@J2ktIncompatible
165163
@GwtIncompatible
166164
@ElementTypesAreNonnullByDefault
@@ -173,7 +171,6 @@ public class CycleDetectingLockFactory {
173171
*
174172
* @since 13.0
175173
*/
176-
@Beta
177174
public interface Policy {
178175

179176
/**
@@ -193,7 +190,6 @@ public interface Policy {
193190
*
194191
* @since 13.0
195192
*/
196-
@Beta
197193
public enum Policies implements Policy {
198194
/**
199195
* When potential deadlock is detected, this policy results in the throwing of the {@code
@@ -394,7 +390,6 @@ private static String getLockName(Enum<?> rank) {
394390
* @param <E> The Enum type representing the explicit lock ordering.
395391
* @since 13.0
396392
*/
397-
@Beta
398393
public static final class WithExplicitOrdering<E extends Enum<E>>
399394
extends CycleDetectingLockFactory {
400395

@@ -534,7 +529,6 @@ private static class ExampleStackTrace extends IllegalStateException {
534529
*
535530
* @since 13.0
536531
*/
537-
@Beta
538532
public static final class PotentialDeadlockException extends ExampleStackTrace {
539533

540534
private final ExampleStackTrace conflictingStackTrace;

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

-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import static com.google.common.base.Preconditions.checkNotNull;
1818
import static com.google.common.util.concurrent.Platform.restoreInterruptIfIsInterruptedException;
1919

20-
import com.google.common.annotations.Beta;
2120
import com.google.common.annotations.GwtIncompatible;
2221
import com.google.common.annotations.J2ktIncompatible;
2322
import com.google.errorprone.annotations.CanIgnoreReturnValue;
@@ -36,7 +35,6 @@
3635
* @author Jens Nyman
3736
* @since 1.0
3837
*/
39-
@Beta
4038
@J2ktIncompatible
4139
@GwtIncompatible
4240
@ElementTypesAreNonnullByDefault

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

-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import static com.google.common.base.Preconditions.checkNotNull;
1818
import static com.google.common.util.concurrent.Uninterruptibles.getUninterruptibly;
1919

20-
import com.google.common.annotations.Beta;
2120
import com.google.common.annotations.GwtIncompatible;
2221
import com.google.common.annotations.J2ktIncompatible;
2322
import java.util.concurrent.ExecutionException;
@@ -39,7 +38,6 @@
3938
* @author Sven Mawson
4039
* @since 10.0 (replacing {@code Futures.makeListenable}, which existed in 1.0)
4140
*/
42-
@Beta
4341
@J2ktIncompatible
4442
@GwtIncompatible
4543
@ElementTypesAreNonnullByDefault

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

-2
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,13 @@
1414

1515
package com.google.common.util.concurrent;
1616

17-
import com.google.common.annotations.Beta;
1817
import com.google.common.annotations.GwtCompatible;
1918

2019
/**
2120
* Static utility methods pertaining to the {@link Runnable} interface.
2221
*
2322
* @since 16.0
2423
*/
25-
@Beta
2624
@GwtCompatible
2725
@ElementTypesAreNonnullByDefault
2826
public final class Runnables {

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

-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import static com.google.common.base.Preconditions.checkArgument;
1818
import static com.google.common.base.Preconditions.checkNotNull;
1919

20-
import com.google.common.annotations.Beta;
2120
import com.google.common.annotations.GwtIncompatible;
2221
import com.google.common.annotations.J2ktIncompatible;
2322
import com.google.common.collect.ObjectArrays;
@@ -46,7 +45,6 @@
4645
* @author Jens Nyman
4746
* @since 1.0
4847
*/
49-
@Beta
5048
@J2ktIncompatible
5149
@GwtIncompatible
5250
@ElementTypesAreNonnullByDefault

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
package com.google.common.util.concurrent;
1616

17-
import com.google.common.annotations.Beta;
17+
1818
import com.google.common.annotations.GwtIncompatible;
1919
import com.google.common.annotations.J2ktIncompatible;
2020
import com.google.errorprone.annotations.CanIgnoreReturnValue;
@@ -32,7 +32,6 @@
3232
* @author Jens Nyman
3333
* @since 1.0
3434
*/
35-
@Beta
3635
@DoNotMock("Use FakeTimeLimiter")
3736
@J2ktIncompatible
3837
@GwtIncompatible

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

-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
import static com.google.common.util.concurrent.Platform.restoreInterruptIfIsInterruptedException;
1818

19-
import com.google.common.annotations.Beta;
2019
import com.google.common.annotations.GwtIncompatible;
2120
import com.google.common.annotations.J2ktIncompatible;
2221
import com.google.errorprone.annotations.CanIgnoreReturnValue;
@@ -143,7 +142,6 @@ protected void shutDown() throws Exception {}
143142
* implementing {@code stopping}. Note, however, that {@code stopping} does not run at exactly the
144143
* same times as {@code triggerShutdown}.
145144
*/
146-
@Beta
147145
protected void triggerShutdown() {}
148146

149147
/**

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

-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import static java.util.Objects.requireNonNull;
2222
import static java.util.concurrent.atomic.AtomicReferenceFieldUpdater.newUpdater;
2323

24-
import com.google.common.annotations.Beta;
2524
import com.google.common.annotations.GwtCompatible;
2625
import com.google.common.base.Strings;
2726
import com.google.common.util.concurrent.internal.InternalFutureFailureAccess;
@@ -1071,7 +1070,6 @@ private static void complete(AbstractFuture<?> param, boolean callInterruptTask)
10711070
*
10721071
* @since 20.0
10731072
*/
1074-
@Beta
10751073
@ForOverride
10761074
protected void afterDone() {}
10771075

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

-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
package com.google.common.util.concurrent;
1616

17-
import com.google.common.annotations.Beta;
1817
import com.google.common.annotations.GwtIncompatible;
1918
import com.google.common.annotations.J2ktIncompatible;
2019
import com.google.errorprone.annotations.CanIgnoreReturnValue;
@@ -36,7 +35,6 @@
3635
* @since 14.0
3736
*/
3837
@CheckReturnValue
39-
@Beta
4038
@GwtIncompatible
4139
@J2ktIncompatible
4240
@ElementTypesAreNonnullByDefault

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

-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import static com.google.common.util.concurrent.Service.State.TERMINATED;
2727
import static java.util.Objects.requireNonNull;
2828

29-
import com.google.common.annotations.Beta;
3029
import com.google.common.annotations.GwtIncompatible;
3130
import com.google.common.annotations.J2ktIncompatible;
3231
import com.google.common.util.concurrent.Monitor.Guard;
@@ -240,7 +239,6 @@ protected AbstractService() {}
240239
*
241240
* @since 27.0
242241
*/
243-
@Beta
244242
@ForOverride
245243
protected void doCancelStart() {}
246244

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

-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import static com.google.common.base.Preconditions.checkNotNull;
2020

21-
import com.google.common.annotations.Beta;
2221
import com.google.common.annotations.GwtCompatible;
2322
import com.google.common.annotations.J2ktIncompatible;
2423
import com.google.errorprone.annotations.CanIgnoreReturnValue;
@@ -242,7 +241,6 @@ boolean remove(K key, long value) {
242241
*
243242
* @since 20.0
244243
*/
245-
@Beta
246244
@CanIgnoreReturnValue
247245
public boolean removeIfZero(K key) {
248246
return remove(key, 0);

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

-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
import static com.google.common.base.Preconditions.checkNotNull;
1818

19-
import com.google.common.annotations.Beta;
2019
import com.google.common.annotations.GwtCompatible;
2120
import com.google.common.annotations.GwtIncompatible;
2221
import com.google.common.annotations.J2ktIncompatible;
@@ -48,7 +47,6 @@ private Callables() {}
4847
*
4948
* @since 20.0
5049
*/
51-
@Beta
5250
@J2ktIncompatible
5351
@GwtIncompatible
5452
public static <T extends @Nullable Object> AsyncCallable<T> asAsyncCallable(

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

-6
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import static com.google.common.base.Preconditions.checkNotNull;
1818
import static java.util.Objects.requireNonNull;
1919

20-
import com.google.common.annotations.Beta;
2120
import com.google.common.annotations.GwtIncompatible;
2221
import com.google.common.annotations.J2ktIncompatible;
2322
import com.google.common.annotations.VisibleForTesting;
@@ -160,7 +159,6 @@
160159
* @author Darick Tong
161160
* @since 13.0
162161
*/
163-
@Beta
164162
@J2ktIncompatible
165163
@GwtIncompatible
166164
@ElementTypesAreNonnullByDefault
@@ -173,7 +171,6 @@ public class CycleDetectingLockFactory {
173171
*
174172
* @since 13.0
175173
*/
176-
@Beta
177174
public interface Policy {
178175

179176
/**
@@ -193,7 +190,6 @@ public interface Policy {
193190
*
194191
* @since 13.0
195192
*/
196-
@Beta
197193
public enum Policies implements Policy {
198194
/**
199195
* When potential deadlock is detected, this policy results in the throwing of the {@code
@@ -394,7 +390,6 @@ private static String getLockName(Enum<?> rank) {
394390
* @param <E> The Enum type representing the explicit lock ordering.
395391
* @since 13.0
396392
*/
397-
@Beta
398393
public static final class WithExplicitOrdering<E extends Enum<E>>
399394
extends CycleDetectingLockFactory {
400395

@@ -534,7 +529,6 @@ private static class ExampleStackTrace extends IllegalStateException {
534529
*
535530
* @since 13.0
536531
*/
537-
@Beta
538532
public static final class PotentialDeadlockException extends ExampleStackTrace {
539533

540534
private final ExampleStackTrace conflictingStackTrace;

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

-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import static com.google.common.base.Preconditions.checkNotNull;
1818
import static com.google.common.util.concurrent.Platform.restoreInterruptIfIsInterruptedException;
1919

20-
import com.google.common.annotations.Beta;
2120
import com.google.common.annotations.GwtIncompatible;
2221
import com.google.common.annotations.J2ktIncompatible;
2322
import com.google.errorprone.annotations.CanIgnoreReturnValue;
@@ -36,7 +35,6 @@
3635
* @author Jens Nyman
3736
* @since 1.0
3837
*/
39-
@Beta
4038
@J2ktIncompatible
4139
@GwtIncompatible
4240
@ElementTypesAreNonnullByDefault

0 commit comments

Comments
 (0)
Please sign in to comment.