diff --git a/api/src/main/java/io/grpc/ForwardingChannelBuilder.java b/api/src/main/java/io/grpc/ForwardingChannelBuilder.java index cbbe50d1b3b..35f300be126 100644 --- a/api/src/main/java/io/grpc/ForwardingChannelBuilder.java +++ b/api/src/main/java/io/grpc/ForwardingChannelBuilder.java @@ -108,16 +108,6 @@ public T overrideAuthority(String authority) { return thisT(); } - /** - * @deprecated use {@link #usePlaintext()} instead. - */ - @Override - @Deprecated - public T usePlaintext(boolean skipNegotiation) { - delegate().usePlaintext(skipNegotiation); - return thisT(); - } - @Override public T usePlaintext() { delegate().usePlaintext(); diff --git a/api/src/main/java/io/grpc/ManagedChannelBuilder.java b/api/src/main/java/io/grpc/ManagedChannelBuilder.java index 72cf0c909cb..6956661417c 100644 --- a/api/src/main/java/io/grpc/ManagedChannelBuilder.java +++ b/api/src/main/java/io/grpc/ManagedChannelBuilder.java @@ -174,27 +174,6 @@ public T blockingExecutor(Executor executor) { */ public abstract T overrideAuthority(String authority); - /** - * Use of a plaintext connection to the server. By default a secure connection mechanism - * such as TLS will be used. - * - *

Should only be used for testing or for APIs where the use of such API or the data - * exchanged is not sensitive. - * - * @param skipNegotiation @{code true} if there is a priori knowledge that the endpoint supports - * plaintext, {@code false} if plaintext use must be negotiated. - * @deprecated Use {@link #usePlaintext()} instead. - * - * @throws UnsupportedOperationException if plaintext mode is not supported. - * @return this - * @since 1.0.0 - */ - @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1772") - @Deprecated - public T usePlaintext(boolean skipNegotiation) { - throw new UnsupportedOperationException(); - } - /** * Use of a plaintext connection to the server. By default a secure connection mechanism * such as TLS will be used. diff --git a/core/src/main/java/io/grpc/inprocess/InProcessChannelBuilder.java b/core/src/main/java/io/grpc/inprocess/InProcessChannelBuilder.java index 8f8dd42b603..792257758b0 100644 --- a/core/src/main/java/io/grpc/inprocess/InProcessChannelBuilder.java +++ b/core/src/main/java/io/grpc/inprocess/InProcessChannelBuilder.java @@ -94,17 +94,6 @@ public InProcessChannelBuilder useTransportSecurity() { return this; } - /** - * Does nothing. - * - * @deprecated use {@link #usePlaintext()} instead. - */ - @Override - @Deprecated - public InProcessChannelBuilder usePlaintext(boolean skipNegotiation) { - return this; - } - /** * Does nothing. */ diff --git a/cronet/src/main/java/io/grpc/cronet/CronetChannelBuilder.java b/cronet/src/main/java/io/grpc/cronet/CronetChannelBuilder.java index 2fa71220054..1a87de58507 100644 --- a/cronet/src/main/java/io/grpc/cronet/CronetChannelBuilder.java +++ b/cronet/src/main/java/io/grpc/cronet/CronetChannelBuilder.java @@ -127,14 +127,6 @@ public final CronetChannelBuilder alwaysUsePut(boolean enable) { return this; } - /** - * Not supported for building cronet channel. - */ - @Override - public final CronetChannelBuilder usePlaintext(boolean skipNegotiation) { - throw new IllegalArgumentException("Plaintext not currently supported"); - } - /** * Sets {@link android.net.TrafficStats} tag to use when accounting socket traffic caused by this * channel. See {@link android.net.TrafficStats} for more information. If no tag is set (e.g. this diff --git a/netty/src/main/java/io/grpc/netty/NettyChannelBuilder.java b/netty/src/main/java/io/grpc/netty/NettyChannelBuilder.java index ffae66aad56..b8de4082b75 100644 --- a/netty/src/main/java/io/grpc/netty/NettyChannelBuilder.java +++ b/netty/src/main/java/io/grpc/netty/NettyChannelBuilder.java @@ -289,23 +289,6 @@ public NettyChannelBuilder maxInboundMetadataSize(int bytes) { return this; } - /** - * Equivalent to using {@link #negotiationType(NegotiationType)} with {@code PLAINTEXT} or - * {@code PLAINTEXT_UPGRADE}. - * - * @deprecated use {@link #usePlaintext()} instead. - */ - @Override - @Deprecated - public NettyChannelBuilder usePlaintext(boolean skipNegotiation) { - if (skipNegotiation) { - negotiationType(NegotiationType.PLAINTEXT); - } else { - negotiationType(NegotiationType.PLAINTEXT_UPGRADE); - } - return this; - } - /** * Equivalent to using {@link #negotiationType(NegotiationType)} with {@code PLAINTEXT}. */ diff --git a/okhttp/src/main/java/io/grpc/okhttp/OkHttpChannelBuilder.java b/okhttp/src/main/java/io/grpc/okhttp/OkHttpChannelBuilder.java index 690462ba6ae..26a76f2c8c4 100644 --- a/okhttp/src/main/java/io/grpc/okhttp/OkHttpChannelBuilder.java +++ b/okhttp/src/main/java/io/grpc/okhttp/OkHttpChannelBuilder.java @@ -305,22 +305,6 @@ public final OkHttpChannelBuilder connectionSpec( return this; } - /** - * Equivalent to using {@link #negotiationType} with {@code PLAINTEXT}. - * - * @deprecated use {@link #usePlaintext()} instead. - */ - @Override - @Deprecated - public final OkHttpChannelBuilder usePlaintext(boolean skipNegotiation) { - if (skipNegotiation) { - negotiationType(io.grpc.okhttp.NegotiationType.PLAINTEXT); - } else { - throw new IllegalArgumentException("Plaintext negotiation not currently supported"); - } - return this; - } - /** Sets the negotiation type for the HTTP/2 connection to plaintext. */ @Override public final OkHttpChannelBuilder usePlaintext() {