From b6af40e510755059be52296c1917394e0d2e4301 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 2 Jan 2019 15:30:31 -0800 Subject: [PATCH] examples,netty: fix lint errors --- core/src/main/java/io/grpc/InternalLogId.java | 7 ++++++- .../io/grpc/examples/authentication/AuthClientTest.java | 3 --- .../src/main/java/io/grpc/netty/NettyServerTransport.java | 1 - 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/io/grpc/InternalLogId.java b/core/src/main/java/io/grpc/InternalLogId.java index f668d3c4d3..afb2779a47 100644 --- a/core/src/main/java/io/grpc/InternalLogId.java +++ b/core/src/main/java/io/grpc/InternalLogId.java @@ -33,6 +33,8 @@ public final class InternalLogId { private static final AtomicLong idAlloc = new AtomicLong(); /** + * Creates a log id. + * * @param type the "Type" to be used when logging this id. The short name of this class will be * used, or else a default if the class is anonymous. * @param details a short, human readable string that describes the object the id is attached to. @@ -43,6 +45,8 @@ public final class InternalLogId { } /** + * Creates a log id. + * * @param typeName the "Type" to be used when logging this id. * @param details a short, human readable string that describes the object the id is attached to. * Typically this will be an address or target. @@ -56,7 +60,8 @@ public final class InternalLogId { } private final String typeName; - private final @Nullable String details; + @Nullable + private final String details; private final long id; InternalLogId(String typeName, String details, long id) { diff --git a/examples/src/test/java/io/grpc/examples/authentication/AuthClientTest.java b/examples/src/test/java/io/grpc/examples/authentication/AuthClientTest.java index c159ff6138..3f2ad80465 100644 --- a/examples/src/test/java/io/grpc/examples/authentication/AuthClientTest.java +++ b/examples/src/test/java/io/grpc/examples/authentication/AuthClientTest.java @@ -101,8 +101,6 @@ public class AuthClientTest { @Test public void defaultTokenDeliveredToServer() { ArgumentCaptor metadataCaptor = ArgumentCaptor.forClass(Metadata.class); - ArgumentCaptor requestCaptor = ArgumentCaptor.forClass(HelloRequest.class); - String retVal = client.greet("default token test"); verify(mockServerInterceptor).interceptCall( @@ -121,7 +119,6 @@ public class AuthClientTest { @Test public void nonDefaultTokenDeliveredToServer() { ArgumentCaptor metadataCaptor = ArgumentCaptor.forClass(Metadata.class); - ArgumentCaptor requestCaptor = ArgumentCaptor.forClass(HelloRequest.class); client.setTokenValue("non-default-token"); String retVal = client.greet("non default token test"); diff --git a/netty/src/main/java/io/grpc/netty/NettyServerTransport.java b/netty/src/main/java/io/grpc/netty/NettyServerTransport.java index 62249b6ffe..d48fbe8975 100644 --- a/netty/src/main/java/io/grpc/netty/NettyServerTransport.java +++ b/netty/src/main/java/io/grpc/netty/NettyServerTransport.java @@ -47,7 +47,6 @@ import java.util.logging.Logger; * The Netty-based server transport. */ class NettyServerTransport implements ServerTransport { - private static final Logger log = Logger.getLogger(NettyServerTransport.class.getName()); // connectionLog is for connection related messages only private static final Logger connectionLog = Logger.getLogger( String.format("%s.connections", NettyServerTransport.class.getName()));