aboutsummaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
authorEric Anderson <ejona@google.com>2018-03-26 16:17:45 -0700
committerEric Anderson <ejona@google.com>2018-03-26 16:57:09 -0700
commit3bb6708eeec56c479525018b0bad5f3c42b04f67 (patch)
tree6cf8ac70538dbcc3711c599d5b4c85ad61cc642e /services
parent25f357699a18c7cc724c369eb9be4e9d10c78c41 (diff)
downloadgrpc-grpc-java-3bb6708eeec56c479525018b0bad5f3c42b04f67.tar.gz
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.
Diffstat (limited to 'services')
-rw-r--r--services/src/main/java/io/grpc/services/BinaryLog.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/services/src/main/java/io/grpc/services/BinaryLog.java b/services/src/main/java/io/grpc/services/BinaryLog.java
index 34ce04403..c57c534da 100644
--- a/services/src/main/java/io/grpc/services/BinaryLog.java
+++ b/services/src/main/java/io/grpc/services/BinaryLog.java
@@ -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;
+ }
}