core: fix lint warnings

This commit is contained in:
Carl Mastrangelo 2017-08-25 11:23:03 -07:00 committed by GitHub
parent 485431880f
commit a53d030b5c
4 changed files with 2 additions and 19 deletions

View File

@ -45,9 +45,9 @@ final class ServerCallImpl<ReqT, RespT> extends ServerCall<ReqT, RespT> {
private static final Logger log = Logger.getLogger(ServerCallImpl.class.getName());
@VisibleForTesting
static String TOO_MANY_RESPONSES = "Too many responses";
static final String TOO_MANY_RESPONSES = "Too many responses";
@VisibleForTesting
static String MISSING_RESPONSE = "Completed without a response";
static final String MISSING_RESPONSE = "Completed without a response";
private final ServerStream stream;
private final MethodDescriptor<ReqT, RespT> method;

View File

@ -27,8 +27,6 @@ import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
import io.grpc.Attributes;
import io.grpc.CallOptions;
import io.grpc.ClientStreamTracer;
import io.grpc.Codec;
import io.grpc.Metadata;
import io.grpc.Status;
@ -226,14 +224,6 @@ public class AbstractClientStreamTest {
public void getRequest() {
AbstractClientStream.Sink sink = mock(AbstractClientStream.Sink.class);
final TestClientStreamTracer tracer = new TestClientStreamTracer();
ClientStreamTracer.Factory tracerFactory =
new ClientStreamTracer.Factory() {
@Override
public ClientStreamTracer newClientStreamTracer(
CallOptions callOptions, Metadata headers) {
return tracer;
}
};
StatsTraceContext statsTraceCtx = new StatsTraceContext(new StreamTracer[] {tracer});
AbstractClientStream stream = new BaseAbstractClientStream(allocator,
new BaseTransportState(statsTraceCtx), sink, statsTraceCtx, true);

View File

@ -62,8 +62,6 @@ public class MessageDeframerTest {
private Listener listener = mock(Listener.class);
private TestBaseStreamTracer tracer = new TestBaseStreamTracer();
private StatsTraceContext statsTraceCtx = new StatsTraceContext(new StreamTracer[]{tracer});
private ArgumentCaptor<Long> wireSizeCaptor = ArgumentCaptor.forClass(Long.class);
private ArgumentCaptor<Long> uncompressedSizeCaptor = ArgumentCaptor.forClass(Long.class);
private MessageDeframer deframer = new MessageDeframer(listener, Codec.Identity.NONE,
DEFAULT_MAX_MESSAGE_SIZE, statsTraceCtx, "test");
@ -397,10 +395,6 @@ public class MessageDeframerTest {
assertEquals(uncompressedBytesReceived, tracer.getInboundUncompressedSize());
}
private static List<Byte> bytes(ArgumentCaptor<InputStream> captor) {
return bytes(captor.getValue());
}
private static List<Byte> bytes(InputStream in) {
try {
return Bytes.asList(ByteStreams.toByteArray(in));

View File

@ -180,7 +180,6 @@ public class ProtoLiteUtilsTest {
@Test
public void testDrainTo_none() throws Exception {
byte[] golden = ByteStreams.toByteArray(marshaller.stream(proto));
InputStream is = marshaller.stream(proto);
byte[] unused = ByteStreams.toByteArray(is);
Drainable d = (Drainable) is;