mirror of https://github.com/grpc/grpc-java.git
core: fix lint warnings
This commit is contained in:
parent
485431880f
commit
a53d030b5c
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue