Skip to content

Commit 2d454d4

Browse files
authored
Revert "Revert "all: remove deprecated usePlaintext(boolean)""
This reverts commit 316a739.
1 parent 86bfefd commit 2d454d4

File tree

6 files changed

+0
-83
lines changed

6 files changed

+0
-83
lines changed

api/src/main/java/io/grpc/ForwardingChannelBuilder.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,6 @@ public T overrideAuthority(String authority) {
108108
return thisT();
109109
}
110110

111-
/**
112-
* @deprecated use {@link #usePlaintext()} instead.
113-
*/
114-
@Override
115-
@Deprecated
116-
public T usePlaintext(boolean skipNegotiation) {
117-
delegate().usePlaintext(skipNegotiation);
118-
return thisT();
119-
}
120-
121111
@Override
122112
public T usePlaintext() {
123113
delegate().usePlaintext();

api/src/main/java/io/grpc/ManagedChannelBuilder.java

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -174,27 +174,6 @@ public T blockingExecutor(Executor executor) {
174174
*/
175175
public abstract T overrideAuthority(String authority);
176176

177-
/**
178-
* Use of a plaintext connection to the server. By default a secure connection mechanism
179-
* such as TLS will be used.
180-
*
181-
* <p>Should only be used for testing or for APIs where the use of such API or the data
182-
* exchanged is not sensitive.
183-
*
184-
* @param skipNegotiation @{code true} if there is a priori knowledge that the endpoint supports
185-
* plaintext, {@code false} if plaintext use must be negotiated.
186-
* @deprecated Use {@link #usePlaintext()} instead.
187-
*
188-
* @throws UnsupportedOperationException if plaintext mode is not supported.
189-
* @return this
190-
* @since 1.0.0
191-
*/
192-
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1772")
193-
@Deprecated
194-
public T usePlaintext(boolean skipNegotiation) {
195-
throw new UnsupportedOperationException();
196-
}
197-
198177
/**
199178
* Use of a plaintext connection to the server. By default a secure connection mechanism
200179
* such as TLS will be used.

core/src/main/java/io/grpc/inprocess/InProcessChannelBuilder.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,6 @@ public InProcessChannelBuilder useTransportSecurity() {
9494
return this;
9595
}
9696

97-
/**
98-
* Does nothing.
99-
*
100-
* @deprecated use {@link #usePlaintext()} instead.
101-
*/
102-
@Override
103-
@Deprecated
104-
public InProcessChannelBuilder usePlaintext(boolean skipNegotiation) {
105-
return this;
106-
}
107-
10897
/**
10998
* Does nothing.
11099
*/

cronet/src/main/java/io/grpc/cronet/CronetChannelBuilder.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,6 @@ public final CronetChannelBuilder alwaysUsePut(boolean enable) {
127127
return this;
128128
}
129129

130-
/**
131-
* Not supported for building cronet channel.
132-
*/
133-
@Override
134-
public final CronetChannelBuilder usePlaintext(boolean skipNegotiation) {
135-
throw new IllegalArgumentException("Plaintext not currently supported");
136-
}
137-
138130
/**
139131
* Sets {@link android.net.TrafficStats} tag to use when accounting socket traffic caused by this
140132
* channel. See {@link android.net.TrafficStats} for more information. If no tag is set (e.g. this

netty/src/main/java/io/grpc/netty/NettyChannelBuilder.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -289,23 +289,6 @@ public NettyChannelBuilder maxInboundMetadataSize(int bytes) {
289289
return this;
290290
}
291291

292-
/**
293-
* Equivalent to using {@link #negotiationType(NegotiationType)} with {@code PLAINTEXT} or
294-
* {@code PLAINTEXT_UPGRADE}.
295-
*
296-
* @deprecated use {@link #usePlaintext()} instead.
297-
*/
298-
@Override
299-
@Deprecated
300-
public NettyChannelBuilder usePlaintext(boolean skipNegotiation) {
301-
if (skipNegotiation) {
302-
negotiationType(NegotiationType.PLAINTEXT);
303-
} else {
304-
negotiationType(NegotiationType.PLAINTEXT_UPGRADE);
305-
}
306-
return this;
307-
}
308-
309292
/**
310293
* Equivalent to using {@link #negotiationType(NegotiationType)} with {@code PLAINTEXT}.
311294
*/

okhttp/src/main/java/io/grpc/okhttp/OkHttpChannelBuilder.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -305,22 +305,6 @@ public final OkHttpChannelBuilder connectionSpec(
305305
return this;
306306
}
307307

308-
/**
309-
* Equivalent to using {@link #negotiationType} with {@code PLAINTEXT}.
310-
*
311-
* @deprecated use {@link #usePlaintext()} instead.
312-
*/
313-
@Override
314-
@Deprecated
315-
public final OkHttpChannelBuilder usePlaintext(boolean skipNegotiation) {
316-
if (skipNegotiation) {
317-
negotiationType(io.grpc.okhttp.NegotiationType.PLAINTEXT);
318-
} else {
319-
throw new IllegalArgumentException("Plaintext negotiation not currently supported");
320-
}
321-
return this;
322-
}
323-
324308
/** Sets the negotiation type for the HTTP/2 connection to plaintext. */
325309
@Override
326310
public final OkHttpChannelBuilder usePlaintext() {

0 commit comments

Comments
 (0)