mirror of https://github.com/grpc/grpc-java.git
services: Specify serialVersionUID for the dummy SocketAddress
This fixes a serial warning that breaks the build when building _without_ ErrorProne. I have no clue why _disabling_ ErrorProne makes the warning pop up, but whatever, the warning is legit. I also gave it a name, since the anonymous $1 seems weird if we're providing a serialVersionUID. Not to say we're actually supporting serializing this object. But if we ever see a serialized form show up in the future, having a more clear name would make it obvious what it is.
This commit is contained in:
parent
25f357699a
commit
3bb6708eee
|
|
@ -81,7 +81,7 @@ final class BinaryLog implements ServerInterceptor, ClientInterceptor {
|
|||
@VisibleForTesting
|
||||
static final byte[] dumyCallId = new byte[16];
|
||||
@VisibleForTesting
|
||||
static final SocketAddress DUMMY_SOCKET = new SocketAddress() { };
|
||||
static final SocketAddress DUMMY_SOCKET = new DummySocketAddress();
|
||||
@VisibleForTesting
|
||||
static final boolean DUMMY_IS_COMPRESSED = false;
|
||||
|
||||
|
|
@ -619,4 +619,8 @@ final class BinaryLog implements ServerInterceptor, ClientInterceptor {
|
|||
static int flagsForMessage(boolean compressed) {
|
||||
return compressed ? 1 : 0;
|
||||
}
|
||||
|
||||
private static class DummySocketAddress extends SocketAddress {
|
||||
private static final long serialVersionUID = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue