aboutsummaryrefslogtreecommitdiff
path: root/netty
diff options
context:
space:
mode:
authorCarl Mastrangelo <notcarl@google.com>2018-02-28 08:53:14 -0800
committerGitHub <noreply@github.com>2018-02-28 08:53:14 -0800
commit7af2373a0316c40b79b819978aa8dd113e3f3ae4 (patch)
treef91d56a6da8fddf9739b53ccf43455797c8137e9 /netty
parent1b5aadf0683591fdf17e505b95dee0c3db8195b8 (diff)
downloadgrpc-grpc-java-7af2373a0316c40b79b819978aa8dd113e3f3ae4.tar.gz
core,netty,okhttp,alts,inprocess: deprecate usePlaintext(boolean)
Diffstat (limited to 'netty')
-rw-r--r--netty/shaded/src/testShadow/java/io/grpc/netty/shaded/ShadingTest.java2
-rw-r--r--netty/src/main/java/io/grpc/netty/NettyChannelBuilder.java12
2 files changed, 13 insertions, 1 deletions
diff --git a/netty/shaded/src/testShadow/java/io/grpc/netty/shaded/ShadingTest.java b/netty/shaded/src/testShadow/java/io/grpc/netty/shaded/ShadingTest.java
index 10b84fd35..98228b58f 100644
--- a/netty/shaded/src/testShadow/java/io/grpc/netty/shaded/ShadingTest.java
+++ b/netty/shaded/src/testShadow/java/io/grpc/netty/shaded/ShadingTest.java
@@ -78,7 +78,7 @@ public final class ShadingTest {
.build().start();
channel = ManagedChannelBuilder
.forAddress("localhost", server.getPort())
- .usePlaintext(true)
+ .usePlaintext()
.build();
SimpleServiceBlockingStub stub = SimpleServiceGrpc.newBlockingStub(channel);
assertThat(SimpleResponse.getDefaultInstance())
diff --git a/netty/src/main/java/io/grpc/netty/NettyChannelBuilder.java b/netty/src/main/java/io/grpc/netty/NettyChannelBuilder.java
index 92ef0ca72..92b68ce59 100644
--- a/netty/src/main/java/io/grpc/netty/NettyChannelBuilder.java
+++ b/netty/src/main/java/io/grpc/netty/NettyChannelBuilder.java
@@ -226,8 +226,11 @@ public final class NettyChannelBuilder
/**
* 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);
@@ -238,6 +241,15 @@ public final class NettyChannelBuilder
}
/**
+ * Equivalent to using {@link #negotiationType(NegotiationType)} with {@code PLAINTEXT}.
+ */
+ @Override
+ public NettyChannelBuilder usePlaintext() {
+ negotiationType(NegotiationType.PLAINTEXT);
+ return this;
+ }
+
+ /**
* Equivalent to using {@link #negotiationType(NegotiationType)} with {@code TLS}.
*/
@Override