Remove old BetaApi failure suppressions

We've been on newer versions of Guava for a while now; these no longer
do anything.

Reworded the comment for Stopwatch.createUnstarted(), because it is not
safe (it doesn't matter if the method isn't marked Beta; you have to use
Ticker), except for the fact it is only used in our tests.
This commit is contained in:
Eric Anderson 2018-12-21 14:05:44 -08:00
parent 08efd978d7
commit e74576b85b
12 changed files with 1 additions and 17 deletions

View File

@ -54,7 +54,6 @@ final class AltsChannelCrypter implements ChannelCrypterNetty {
return COUNTER_LENGTH;
}
@SuppressWarnings("BetaApi") // verify is stable in Guava
@Override
public void encrypt(ByteBuf outBuf, List<ByteBuf> plainBufs) throws GeneralSecurityException {
checkArgument(outBuf.nioBufferCount() == 1);
@ -93,7 +92,6 @@ final class AltsChannelCrypter implements ChannelCrypterNetty {
decrypt(out, cipherTextAndTag);
}
@SuppressWarnings("BetaApi") // verify is stable in Guava
@Override
public void decrypt(ByteBuf out, ByteBuf ciphertextAndTag) throws GeneralSecurityException {
int bytesRead = ciphertextAndTag.readableBytes();

View File

@ -128,7 +128,6 @@ public final class AltsTsiFrameProtector implements TsiFrameProtector {
}
}
@SuppressWarnings("BetaApi") // verify is stable in Guava
private ByteBuf handleUnprotected(List<ByteBuf> unprotectedBufs, ByteBufAllocator alloc)
throws GeneralSecurityException {
long unprotectedBytes = 0;
@ -270,7 +269,6 @@ public final class AltsTsiFrameProtector implements TsiFrameProtector {
state = DeframerState.READ_PROTECTED_PAYLOAD;
}
@SuppressWarnings("BetaApi") // verify is stable in Guava
private ByteBuf handlePayload(ByteBufAllocator alloc) throws GeneralSecurityException {
int requiredCiphertextBytes = requiredProtectedBytes - suffixBytes;
int firstFrameUnprotectedLen = requiredCiphertextBytes;

View File

@ -184,7 +184,6 @@ final class GoogleAuthLibraryCallCredentials extends CallCredentials2 {
}
}
@SuppressWarnings("BetaApi") // BaseEncoding is stable in Guava 20.0
private static Metadata toHeaders(@Nullable Map<String, List<String>> metadata) {
Metadata headers = new Metadata();
if (metadata != null) {

View File

@ -457,7 +457,6 @@ public final class Metadata {
}
}
@SuppressWarnings("BetaApi") // BaseEncoding is stable in Guava 20.0
@Override
public String toString() {
StringBuilder sb = new StringBuilder("Metadata(");

View File

@ -506,7 +506,6 @@ final class DnsNameResolver extends NameResolver {
* @return The service config object or {@code null} if this choice does not apply.
*/
@Nullable
@SuppressWarnings("BetaApi") // Verify isn't all that beta
@VisibleForTesting
static Map<String, Object> maybeChooseServiceConfig(
Map<String, Object> choice, Random random, String hostname) {

View File

@ -204,7 +204,6 @@ final class JndiResourceResolverFactory implements DnsNameResolver.ResourceResol
final int port;
}
@SuppressWarnings("BetaApi") // Verify is only kinda beta
private static SrvRecord parseSrvRecord(String rawRecord) {
String[] parts = whitespace.split(rawRecord);
Verify.verify(parts.length == 4, "Bad SRV Record: %s", rawRecord);

View File

@ -201,7 +201,6 @@ final class ServiceConfigInterceptor implements ClientInterceptor {
.toString();
}
@SuppressWarnings("BetaApi") // Verify is stabilized since Guava v24.0
private static RetryPolicy retryPolicy(Map<String, Object> retryPolicy, int maxAttemptsLimit) {
int maxAttempts = checkNotNull(
ServiceConfigUtil.getMaxAttemptsFromRetryPolicy(retryPolicy),
@ -249,7 +248,6 @@ final class ServiceConfigInterceptor implements ClientInterceptor {
}
}
@SuppressWarnings("BetaApi") // Verify is stabilized since Guava v24.0
private static HedgingPolicy hedgingPolicy(
Map<String, Object> hedgingPolicy, int maxAttemptsLimit) {
int maxAttempts = checkNotNull(
@ -284,7 +282,6 @@ final class ServiceConfigInterceptor implements ClientInterceptor {
static final CallOptions.Key<HedgingPolicy.Provider> HEDGING_POLICY_KEY =
CallOptions.Key.create("internal-hedging-policy");
@SuppressWarnings("BetaApi") // Verify is stabilized since Guava v24.0
@Override
public <ReqT, RespT> ClientCall<ReqT, RespT> interceptCall(
final MethodDescriptor<ReqT, RespT> method, CallOptions callOptions, Channel next) {

View File

@ -47,7 +47,6 @@ public final class TransportFrameUtil {
*
* @return the interleaved keys and values.
*/
@SuppressWarnings("BetaApi") // BaseEncoding is stable in Guava 20.0
public static byte[][] toHttp2Headers(Metadata headers) {
byte[][] serializedHeaders = InternalMetadata.serialize(headers);
// TODO(carl-mastrangelo): eventually remove this once all callers are updated.
@ -97,7 +96,6 @@ public final class TransportFrameUtil {
* @param http2Headers the interleaved keys and values of HTTP/2-compliant headers
* @return the interleaved keys and values in the raw serialized format
*/
@SuppressWarnings("BetaApi") // BaseEncoding is stable in Guava 20.0
@CheckReturnValue
public static byte[][] toRawSerializedHeaders(byte[][] http2Headers) {
for (int i = 0; i < http2Headers.length; i += 2) {

View File

@ -101,7 +101,6 @@ class GrpcHttp2HeadersUtils {
values = new AsciiString[numHeadersGuess];
}
@SuppressWarnings("BetaApi") // BaseEncoding is stable in Guava 20.0
protected Http2Headers add(AsciiString name, AsciiString value) {
byte[] nameBytes = bytes(name);
byte[] valueBytes;

View File

@ -114,7 +114,6 @@ class NettyClientStream extends AbstractClientStream {
}
private class Sink implements AbstractClientStream.Sink {
@SuppressWarnings("BetaApi") // BaseEncoding is stable in Guava 20.0
@Override
public void writeHeaders(Metadata headers, byte[] requestPayload) {
// Convert the headers into Netty HTTP/2 headers.

View File

@ -139,7 +139,6 @@ class OkHttpClientStream extends AbstractClientStream {
}
class Sink implements AbstractClientStream.Sink {
@SuppressWarnings("BetaApi") // BaseEncoding is stable in Guava 20.0
@Override
public void writeHeaders(Metadata metadata, byte[] payload) {
String defaultPath = "/" + method.getFullMethodName();

View File

@ -74,7 +74,7 @@ public final class GrpcCleanupRule implements TestRule {
*
* @return this
*/
@SuppressWarnings("BetaApi") // Stopwatch.createUnstarted(Ticker ticker) is not Beta. Test only.
@SuppressWarnings("BetaApi") // Test only.
@VisibleForTesting
GrpcCleanupRule setTicker(Ticker ticker) {
this.stopwatch = Stopwatch.createUnstarted(ticker);