Skip to content

Commit 70b482a

Browse files
lukaszx0zhangkun83
authored andcommitted
core: clean up code deprecated in 1.1 (grpc#2678)
1 parent 63a7765 commit 70b482a

File tree

2 files changed

+4
-32
lines changed

2 files changed

+4
-32
lines changed

core/src/main/java/io/grpc/ServerCall.java

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232
package io.grpc;
3333

3434
import com.google.errorprone.annotations.DoNotMock;
35-
import java.net.SocketAddress;
36-
import javax.net.ssl.SSLSession;
3735

3836
/**
3937
* Encapsulates a single call received from a remote client. Calls may not simply be unary
@@ -54,27 +52,6 @@
5452
*/
5553
@DoNotMock("Use InProcessTransport and make a fake server instead")
5654
public abstract class ServerCall<ReqT, RespT> {
57-
/**
58-
* {@link Attributes.Key} for the remote address of server call attributes
59-
* {@link ServerCall#getAttributes()}
60-
*
61-
* @deprecated use the equivalent {@link io.grpc.Grpc#TRANSPORT_ATTR_REMOTE_ADDR} instead
62-
*/
63-
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1710")
64-
@Deprecated
65-
public static final Attributes.Key<SocketAddress> REMOTE_ADDR_KEY =
66-
Grpc.TRANSPORT_ATTR_REMOTE_ADDR;
67-
68-
/**
69-
* {@link Attributes.Key} for the SSL session of server call attributes
70-
* {@link ServerCall#getAttributes()}
71-
*
72-
* @deprecated use the equivalent {@link io.grpc.Grpc#TRANSPORT_ATTR_SSL_SESSION} instead
73-
*/
74-
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1710")
75-
@Deprecated
76-
public static final Attributes.Key<SSLSession> SSL_SESSION_KEY =
77-
Grpc.TRANSPORT_ATTR_SSL_SESSION;
7855

7956
/**
8057
* Callbacks for consuming incoming RPC messages.
@@ -238,15 +215,6 @@ public Attributes getAttributes() {
238215
return Attributes.EMPTY;
239216
}
240217

241-
/**
242-
* @deprecated use {@link #getAttributes()} instead.
243-
*/
244-
@Deprecated
245-
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1779")
246-
public Attributes attributes() {
247-
return getAttributes();
248-
}
249-
250218
/**
251219
* The {@link MethodDescriptor} for the call.
252220
*/

testing/src/main/java/io/grpc/testing/DeadlineSubject.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ private TolerantDeadlineComparison() {}
110110
* @deprecated {@link Object#equals(Object)} is not supported on TolerantDeadlineComparison
111111
* If you meant to compare deadlines, use {@link #of(Deadline)} instead.
112112
*/
113+
// Deprecation used to signal visual warning in IDE for the unaware users.
114+
// This method is created as a precaution and won't be removed as part of deprecation policy.
113115
@Deprecated
114116
@Override
115117
public boolean equals(@Nullable Object o) {
@@ -123,6 +125,8 @@ public boolean equals(@Nullable Object o) {
123125
* @throws UnsupportedOperationException always
124126
* @deprecated {@link Object#hashCode()} is not supported on TolerantDeadlineComparison
125127
*/
128+
// Deprecation used to signal visual warning in IDE for the unaware users.
129+
// This method is created as a precaution and won't be removed as part of deprecation policy.
126130
@Deprecated
127131
@Override
128132
public int hashCode() {

0 commit comments

Comments
 (0)