mirror of https://github.com/grpc/grpc-java.git
core: fix nags from linter
This commit is contained in:
parent
02eb24b3bd
commit
676bf4854f
|
|
@ -697,7 +697,7 @@ public class ManagedChannelImplTest {
|
|||
}
|
||||
}
|
||||
|
||||
private class FailingNameResolverFactory extends NameResolver.Factory {
|
||||
private static class FailingNameResolverFactory extends NameResolver.Factory {
|
||||
final Status error;
|
||||
|
||||
FailingNameResolverFactory(Status error) {
|
||||
|
|
@ -725,7 +725,7 @@ public class ManagedChannelImplTest {
|
|||
}
|
||||
}
|
||||
|
||||
private class SpyingLoadBalancerFactory extends LoadBalancer.Factory {
|
||||
private static class SpyingLoadBalancerFactory extends LoadBalancer.Factory {
|
||||
private final LoadBalancer.Factory delegate;
|
||||
private final List<LoadBalancer<?>> balancers = new ArrayList<LoadBalancer<?>>();
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@ import io.netty.buffer.EmptyByteBuf;
|
|||
import io.netty.buffer.UnpooledByteBufAllocator;
|
||||
import io.netty.channel.ChannelPromise;
|
||||
import io.netty.handler.codec.http2.DefaultHttp2Headers;
|
||||
import io.netty.handler.codec.http2.Http2Headers;
|
||||
import io.netty.util.AsciiString;
|
||||
|
||||
import org.junit.Before;
|
||||
|
|
@ -66,7 +65,6 @@ import org.junit.Test;
|
|||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
import org.mockito.ArgumentCaptor;
|
||||
import org.mockito.Captor;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.invocation.InvocationOnMock;
|
||||
import org.mockito.stubbing.Answer;
|
||||
|
|
@ -82,9 +80,6 @@ public class NettyServerStreamTest extends NettyStreamTestBase<NettyServerStream
|
|||
@Mock
|
||||
private NettyServerHandler handler;
|
||||
|
||||
@Captor
|
||||
private ArgumentCaptor<Http2Headers> headersCaptor;
|
||||
|
||||
private Metadata trailers = new Metadata();
|
||||
|
||||
@Before
|
||||
|
|
|
|||
|
|
@ -554,7 +554,7 @@ public class OkHttpClientTransportTest {
|
|||
idCaptor.capture(), eq(messageFrameLength));
|
||||
// Should only send window update for the connection.
|
||||
assertEquals(1, idCaptor.getAllValues().size());
|
||||
assertEquals(new Integer(0), idCaptor.getValue());
|
||||
assertEquals(0, (int)idCaptor.getValue());
|
||||
|
||||
stream.request(1);
|
||||
// We return the bytes for the stream window as we read the message.
|
||||
|
|
@ -1551,7 +1551,7 @@ public class OkHttpClientTransportTest {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
public synchronized void close() {
|
||||
frameReader.nextFrameAtEndOfStream();
|
||||
}
|
||||
}
|
||||
|
|
@ -1590,7 +1590,7 @@ public class OkHttpClientTransportTest {
|
|||
frameReader.assertClosed();
|
||||
}
|
||||
|
||||
private class DelayConnectedCallback implements Runnable {
|
||||
private static class DelayConnectedCallback implements Runnable {
|
||||
SettableFuture<Void> delayed = SettableFuture.create();
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -31,12 +31,11 @@
|
|||
|
||||
package io.grpc.services;
|
||||
|
||||
import static io.grpc.health.v1.HealthCheckResponse.ServingStatus;
|
||||
|
||||
import io.grpc.Status;
|
||||
import io.grpc.StatusException;
|
||||
import io.grpc.health.v1.HealthCheckRequest;
|
||||
import io.grpc.health.v1.HealthCheckResponse;
|
||||
import io.grpc.health.v1.HealthCheckResponse.ServingStatus;
|
||||
import io.grpc.health.v1.HealthGrpc;
|
||||
import io.grpc.stub.StreamObserver;
|
||||
|
||||
|
|
|
|||
|
|
@ -32,12 +32,10 @@
|
|||
package io.grpc.services;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import static io.grpc.health.v1.HealthCheckResponse.ServingStatus;
|
||||
|
||||
import io.grpc.health.v1.HealthCheckResponse.ServingStatus;
|
||||
import io.grpc.health.v1.HealthGrpc;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* A {@code HealthStatusManager} object manages a health check service. A health check service is
|
||||
* created in the constructor of {@code HealthStatusManager}, and it can be retrieved by the
|
||||
|
|
@ -86,5 +84,4 @@ public final class HealthStatusManager {
|
|||
public void clearStatus(String service) {
|
||||
healthService.clearStatus(service);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,21 +31,19 @@
|
|||
|
||||
package io.grpc.services;
|
||||
|
||||
import static io.grpc.health.v1.HealthGrpc.Health;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.mockito.Mockito.any;
|
||||
import static org.mockito.Matchers.any;
|
||||
import static org.mockito.Mockito.inOrder;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.never;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
|
||||
import io.grpc.Status;
|
||||
import io.grpc.StatusException;
|
||||
import io.grpc.health.v1.HealthCheckRequest;
|
||||
import io.grpc.health.v1.HealthCheckResponse;
|
||||
import io.grpc.health.v1.HealthGrpc.Health;
|
||||
import io.grpc.stub.StreamObserver;
|
||||
|
||||
import org.junit.Test;
|
||||
|
|
|
|||
Loading…
Reference in New Issue