mirror of https://github.com/grpc/grpc-java.git
examples,netty: fix lint errors
This commit is contained in:
parent
df21e40285
commit
b6af40e510
|
|
@ -33,6 +33,8 @@ public final class InternalLogId {
|
||||||
private static final AtomicLong idAlloc = new AtomicLong();
|
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
|
* @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.
|
* 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.
|
* @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 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.
|
* @param details a short, human readable string that describes the object the id is attached to.
|
||||||
* Typically this will be an address or target.
|
* Typically this will be an address or target.
|
||||||
|
|
@ -56,7 +60,8 @@ public final class InternalLogId {
|
||||||
}
|
}
|
||||||
|
|
||||||
private final String typeName;
|
private final String typeName;
|
||||||
private final @Nullable String details;
|
@Nullable
|
||||||
|
private final String details;
|
||||||
private final long id;
|
private final long id;
|
||||||
|
|
||||||
InternalLogId(String typeName, String details, long id) {
|
InternalLogId(String typeName, String details, long id) {
|
||||||
|
|
|
||||||
|
|
@ -101,8 +101,6 @@ public class AuthClientTest {
|
||||||
@Test
|
@Test
|
||||||
public void defaultTokenDeliveredToServer() {
|
public void defaultTokenDeliveredToServer() {
|
||||||
ArgumentCaptor<Metadata> metadataCaptor = ArgumentCaptor.forClass(Metadata.class);
|
ArgumentCaptor<Metadata> metadataCaptor = ArgumentCaptor.forClass(Metadata.class);
|
||||||
ArgumentCaptor<HelloRequest> requestCaptor = ArgumentCaptor.forClass(HelloRequest.class);
|
|
||||||
|
|
||||||
String retVal = client.greet("default token test");
|
String retVal = client.greet("default token test");
|
||||||
|
|
||||||
verify(mockServerInterceptor).interceptCall(
|
verify(mockServerInterceptor).interceptCall(
|
||||||
|
|
@ -121,7 +119,6 @@ public class AuthClientTest {
|
||||||
@Test
|
@Test
|
||||||
public void nonDefaultTokenDeliveredToServer() {
|
public void nonDefaultTokenDeliveredToServer() {
|
||||||
ArgumentCaptor<Metadata> metadataCaptor = ArgumentCaptor.forClass(Metadata.class);
|
ArgumentCaptor<Metadata> metadataCaptor = ArgumentCaptor.forClass(Metadata.class);
|
||||||
ArgumentCaptor<HelloRequest> requestCaptor = ArgumentCaptor.forClass(HelloRequest.class);
|
|
||||||
|
|
||||||
client.setTokenValue("non-default-token");
|
client.setTokenValue("non-default-token");
|
||||||
String retVal = client.greet("non default token test");
|
String retVal = client.greet("non default token test");
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,6 @@ import java.util.logging.Logger;
|
||||||
* The Netty-based server transport.
|
* The Netty-based server transport.
|
||||||
*/
|
*/
|
||||||
class NettyServerTransport implements ServerTransport {
|
class NettyServerTransport implements ServerTransport {
|
||||||
private static final Logger log = Logger.getLogger(NettyServerTransport.class.getName());
|
|
||||||
// connectionLog is for connection related messages only
|
// connectionLog is for connection related messages only
|
||||||
private static final Logger connectionLog = Logger.getLogger(
|
private static final Logger connectionLog = Logger.getLogger(
|
||||||
String.format("%s.connections", NettyServerTransport.class.getName()));
|
String.format("%s.connections", NettyServerTransport.class.getName()));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue