examples,netty: fix lint errors

This commit is contained in:
Carl Mastrangelo 2019-01-02 15:30:31 -08:00 committed by ZHANG Dapeng
parent df21e40285
commit b6af40e510
3 changed files with 6 additions and 5 deletions

View File

@ -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) {

View File

@ -101,8 +101,6 @@ public class AuthClientTest {
@Test
public void defaultTokenDeliveredToServer() {
ArgumentCaptor<Metadata> metadataCaptor = ArgumentCaptor.forClass(Metadata.class);
ArgumentCaptor<HelloRequest> 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<Metadata> metadataCaptor = ArgumentCaptor.forClass(Metadata.class);
ArgumentCaptor<HelloRequest> requestCaptor = ArgumentCaptor.forClass(HelloRequest.class);
client.setTokenValue("non-default-token");
String retVal = client.greet("non default token test");

View File

@ -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()));