mirror of https://github.com/grpc/grpc-java.git
all: update to error prone 2.3.3
This commit is contained in:
parent
16de96befe
commit
7657523b28
|
|
@ -136,7 +136,7 @@ class AltsHandshakerClient {
|
||||||
throw new IllegalStateException("Could not get enough key data from the handshake.");
|
throw new IllegalStateException("Could not get enough key data from the handshake.");
|
||||||
}
|
}
|
||||||
byte[] key = new byte[KEY_LENGTH];
|
byte[] key = new byte[KEY_LENGTH];
|
||||||
result.getKeyData().copyTo(key, 0, 0, KEY_LENGTH);
|
result.getKeyData().copyTo(key, 0);
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@ import io.grpc.Attributes;
|
||||||
import io.grpc.Channel;
|
import io.grpc.Channel;
|
||||||
import io.grpc.Grpc;
|
import io.grpc.Grpc;
|
||||||
import io.grpc.InternalChannelz;
|
import io.grpc.InternalChannelz;
|
||||||
import io.grpc.InternalChannelz.Security;
|
|
||||||
import io.grpc.ManagedChannel;
|
import io.grpc.ManagedChannel;
|
||||||
import io.grpc.SecurityLevel;
|
import io.grpc.SecurityLevel;
|
||||||
import io.grpc.alts.internal.AltsProtocolNegotiator.LazyChannel;
|
import io.grpc.alts.internal.AltsProtocolNegotiator.LazyChannel;
|
||||||
|
|
@ -396,7 +395,6 @@ public class AltsProtocolNegotiatorTest {
|
||||||
private final class CapturingGrpcHttp2ConnectionHandler extends GrpcHttp2ConnectionHandler {
|
private final class CapturingGrpcHttp2ConnectionHandler extends GrpcHttp2ConnectionHandler {
|
||||||
|
|
||||||
private Attributes attrs;
|
private Attributes attrs;
|
||||||
private Security securityInfo;
|
|
||||||
|
|
||||||
private CapturingGrpcHttp2ConnectionHandler(
|
private CapturingGrpcHttp2ConnectionHandler(
|
||||||
Http2ConnectionDecoder decoder,
|
Http2ConnectionDecoder decoder,
|
||||||
|
|
@ -407,11 +405,11 @@ public class AltsProtocolNegotiatorTest {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handleProtocolNegotiationCompleted(
|
public void handleProtocolNegotiationCompleted(
|
||||||
Attributes attrs, InternalChannelz.Security securityInfo) {
|
Attributes attrs,
|
||||||
|
@SuppressWarnings("UnusedVariable") InternalChannelz.Security securityInfo) {
|
||||||
// If we are added to the pipeline, we need to remove ourselves. The HTTP2 handler
|
// If we are added to the pipeline, we need to remove ourselves. The HTTP2 handler
|
||||||
channel.pipeline().remove(this);
|
channel.pipeline().remove(this);
|
||||||
this.attrs = attrs;
|
this.attrs = attrs;
|
||||||
this.securityInfo = securityInfo;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
errorprone 'com.google.errorprone:error_prone_core:2.3.2'
|
errorprone 'com.google.errorprone:error_prone_core:2.3.3'
|
||||||
errorproneJavac 'com.google.errorprone:javac:9+181-r4173-1'
|
errorproneJavac 'com.google.errorprone:javac:9+181-r4173-1'
|
||||||
|
|
||||||
implementation 'io.grpc:grpc-core:1.22.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
implementation 'io.grpc:grpc-core:1.22.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ dependencies {
|
||||||
libraries.jsr305,
|
libraries.jsr305,
|
||||||
libraries.animalsniffer_annotations
|
libraries.animalsniffer_annotations
|
||||||
compile (libraries.guava) {
|
compile (libraries.guava) {
|
||||||
// prefer 2.3.2 from libraries instead of 2.1.3
|
// prefer 2.3.3 from libraries instead of 2.1.3
|
||||||
exclude group: 'com.google.errorprone', module: 'error_prone_annotations'
|
exclude group: 'com.google.errorprone', module: 'error_prone_annotations'
|
||||||
// prefer 3.0.2 from libraries instead of 3.0.1
|
// prefer 3.0.2 from libraries instead of 3.0.1
|
||||||
exclude group: 'com.google.code.findbugs', module: 'jsr305'
|
exclude group: 'com.google.code.findbugs', module: 'jsr305'
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ public class ServiceProvidersTest {
|
||||||
ClassLoader cl = new ReplacingClassLoader(getClass().getClassLoader(), serviceFile,
|
ClassLoader cl = new ReplacingClassLoader(getClass().getClassLoader(), serviceFile,
|
||||||
"io/grpc/ServiceProvidersTestAbstractProvider-unknownClassProvider.txt");
|
"io/grpc/ServiceProvidersTestAbstractProvider-unknownClassProvider.txt");
|
||||||
try {
|
try {
|
||||||
ServiceProvidersTestAbstractProvider ignored = ServiceProviders.load(
|
ServiceProviders.load(
|
||||||
ServiceProvidersTestAbstractProvider.class, NO_HARDCODED, cl, ACCESSOR);
|
ServiceProvidersTestAbstractProvider.class, NO_HARDCODED, cl, ACCESSOR);
|
||||||
fail("Exception expected");
|
fail("Exception expected");
|
||||||
} catch (ServiceConfigurationError e) {
|
} catch (ServiceConfigurationError e) {
|
||||||
|
|
@ -140,7 +140,7 @@ public class ServiceProvidersTest {
|
||||||
try {
|
try {
|
||||||
// Even though there is a working provider, if any providers fail then we should fail
|
// Even though there is a working provider, if any providers fail then we should fail
|
||||||
// completely to avoid returning something unexpected.
|
// completely to avoid returning something unexpected.
|
||||||
ServiceProvidersTestAbstractProvider ignored = ServiceProviders.load(
|
ServiceProviders.load(
|
||||||
ServiceProvidersTestAbstractProvider.class, NO_HARDCODED, cl, ACCESSOR);
|
ServiceProvidersTestAbstractProvider.class, NO_HARDCODED, cl, ACCESSOR);
|
||||||
fail("Expected exception");
|
fail("Expected exception");
|
||||||
} catch (ServiceConfigurationError expected) {
|
} catch (ServiceConfigurationError expected) {
|
||||||
|
|
@ -154,7 +154,7 @@ public class ServiceProvidersTest {
|
||||||
"io/grpc/ServiceProvidersTestAbstractProvider-failAtPriorityProvider.txt");
|
"io/grpc/ServiceProvidersTestAbstractProvider-failAtPriorityProvider.txt");
|
||||||
try {
|
try {
|
||||||
// The exception should be surfaced to the caller
|
// The exception should be surfaced to the caller
|
||||||
ServiceProvidersTestAbstractProvider ignored = ServiceProviders.load(
|
ServiceProviders.load(
|
||||||
ServiceProvidersTestAbstractProvider.class, NO_HARDCODED, cl, ACCESSOR);
|
ServiceProvidersTestAbstractProvider.class, NO_HARDCODED, cl, ACCESSOR);
|
||||||
fail("Expected exception");
|
fail("Expected exception");
|
||||||
} catch (FailAtPriorityProvider.PriorityException expected) {
|
} catch (FailAtPriorityProvider.PriorityException expected) {
|
||||||
|
|
@ -168,7 +168,7 @@ public class ServiceProvidersTest {
|
||||||
"io/grpc/ServiceProvidersTestAbstractProvider-failAtAvailableProvider.txt");
|
"io/grpc/ServiceProvidersTestAbstractProvider-failAtAvailableProvider.txt");
|
||||||
try {
|
try {
|
||||||
// The exception should be surfaced to the caller
|
// The exception should be surfaced to the caller
|
||||||
ServiceProvidersTestAbstractProvider ignored = ServiceProviders.load(
|
ServiceProviders.load(
|
||||||
ServiceProvidersTestAbstractProvider.class, NO_HARDCODED, cl, ACCESSOR);
|
ServiceProvidersTestAbstractProvider.class, NO_HARDCODED, cl, ACCESSOR);
|
||||||
fail("Expected exception");
|
fail("Expected exception");
|
||||||
} catch (FailAtAvailableProvider.AvailableException expected) {
|
} catch (FailAtAvailableProvider.AvailableException expected) {
|
||||||
|
|
@ -193,10 +193,9 @@ public class ServiceProvidersTest {
|
||||||
@Test
|
@Test
|
||||||
public void getCandidatesViaHardCoded_failAtInit() throws Exception {
|
public void getCandidatesViaHardCoded_failAtInit() throws Exception {
|
||||||
try {
|
try {
|
||||||
Iterable<ServiceProvidersTestAbstractProvider> ignored =
|
ServiceProviders.getCandidatesViaHardCoded(
|
||||||
ServiceProviders.getCandidatesViaHardCoded(
|
ServiceProvidersTestAbstractProvider.class,
|
||||||
ServiceProvidersTestAbstractProvider.class,
|
Collections.<Class<?>>singletonList(FailAtInitProvider.class));
|
||||||
Collections.<Class<?>>singletonList(FailAtInitProvider.class));
|
|
||||||
fail("Expected exception");
|
fail("Expected exception");
|
||||||
} catch (ServiceConfigurationError expected) {
|
} catch (ServiceConfigurationError expected) {
|
||||||
// noop
|
// noop
|
||||||
|
|
@ -206,10 +205,9 @@ public class ServiceProvidersTest {
|
||||||
@Test
|
@Test
|
||||||
public void getCandidatesViaHardCoded_failAtInit_moreCandidates() throws Exception {
|
public void getCandidatesViaHardCoded_failAtInit_moreCandidates() throws Exception {
|
||||||
try {
|
try {
|
||||||
Iterable<ServiceProvidersTestAbstractProvider> ignored =
|
ServiceProviders.getCandidatesViaHardCoded(
|
||||||
ServiceProviders.getCandidatesViaHardCoded(
|
ServiceProvidersTestAbstractProvider.class,
|
||||||
ServiceProvidersTestAbstractProvider.class,
|
ImmutableList.<Class<?>>of(FailAtInitProvider.class, Available0Provider.class));
|
||||||
ImmutableList.<Class<?>>of(FailAtInitProvider.class, Available0Provider.class));
|
|
||||||
fail("Expected exception");
|
fail("Expected exception");
|
||||||
} catch (ServiceConfigurationError expected) {
|
} catch (ServiceConfigurationError expected) {
|
||||||
// noop
|
// noop
|
||||||
|
|
@ -221,7 +219,7 @@ public class ServiceProvidersTest {
|
||||||
class PrivateClass {}
|
class PrivateClass {}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ServiceProvidersTestAbstractProvider ignored = ServiceProviders.create(
|
ServiceProviders.create(
|
||||||
ServiceProvidersTestAbstractProvider.class, PrivateClass.class);
|
ServiceProvidersTestAbstractProvider.class, PrivateClass.class);
|
||||||
fail("Expected exception");
|
fail("Expected exception");
|
||||||
} catch (ServiceConfigurationError expected) {
|
} catch (ServiceConfigurationError expected) {
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ subprojects {
|
||||||
apply plugin: "net.ltgt.errorprone"
|
apply plugin: "net.ltgt.errorprone"
|
||||||
if (rootProject.properties.get('errorProne', true)) {
|
if (rootProject.properties.get('errorProne', true)) {
|
||||||
dependencies {
|
dependencies {
|
||||||
errorprone 'com.google.errorprone:error_prone_core:2.3.2'
|
errorprone 'com.google.errorprone:error_prone_core:2.3.3'
|
||||||
errorproneJavac 'com.google.errorprone:javac:9+181-r4173-1'
|
errorproneJavac 'com.google.errorprone:javac:9+181-r4173-1'
|
||||||
|
|
||||||
annotationProcessor 'com.google.guava:guava-beta-checker:1.0'
|
annotationProcessor 'com.google.guava:guava-beta-checker:1.0'
|
||||||
|
|
|
||||||
|
|
@ -967,7 +967,7 @@ public class ContextTest {
|
||||||
assertNull(logRef.get());
|
assertNull(logRef.get());
|
||||||
ctx = ctx.fork();
|
ctx = ctx.fork();
|
||||||
}
|
}
|
||||||
ctx = ctx.fork();
|
ctx.fork();
|
||||||
assertNotNull(logRef.get());
|
assertNotNull(logRef.get());
|
||||||
assertNotNull(logRef.get().getThrown());
|
assertNotNull(logRef.get().getThrown());
|
||||||
assertEquals(Level.SEVERE, logRef.get().getLevel());
|
assertEquals(Level.SEVERE, logRef.get().getLevel());
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,6 @@ import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.ScheduledExecutorService;
|
import java.util.concurrent.ScheduledExecutorService;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.logging.Logger;
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import javax.annotation.concurrent.ThreadSafe;
|
import javax.annotation.concurrent.ThreadSafe;
|
||||||
|
|
||||||
|
|
@ -64,7 +63,6 @@ import javax.annotation.concurrent.ThreadSafe;
|
||||||
*/
|
*/
|
||||||
@ThreadSafe
|
@ThreadSafe
|
||||||
final class InternalSubchannel implements InternalInstrumented<ChannelStats>, TransportProvider {
|
final class InternalSubchannel implements InternalInstrumented<ChannelStats>, TransportProvider {
|
||||||
private static final Logger log = Logger.getLogger(InternalSubchannel.class.getName());
|
|
||||||
|
|
||||||
private final InternalLogId logId;
|
private final InternalLogId logId;
|
||||||
private final String authority;
|
private final String authority;
|
||||||
|
|
|
||||||
|
|
@ -254,6 +254,7 @@ final class ManagedChannelImpl extends ManagedChannel implements
|
||||||
// Must be mutated and read from constructor or syncContext
|
// Must be mutated and read from constructor or syncContext
|
||||||
// See service config error handling spec for reference.
|
// See service config error handling spec for reference.
|
||||||
// TODO(notcarl): check this value when error in service config resolution
|
// TODO(notcarl): check this value when error in service config resolution
|
||||||
|
@SuppressWarnings("UnusedVariable")
|
||||||
private boolean waitingForServiceConfig = true;
|
private boolean waitingForServiceConfig = true;
|
||||||
private final boolean lookUpServiceConfig;
|
private final boolean lookUpServiceConfig;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@ final class ManagedChannelServiceConfig {
|
||||||
private final Map<String, MethodInfo> serviceMap;
|
private final Map<String, MethodInfo> serviceMap;
|
||||||
// TODO(notcarl/zdapeng): use retryThrottling here
|
// TODO(notcarl/zdapeng): use retryThrottling here
|
||||||
@Nullable
|
@Nullable
|
||||||
|
@SuppressWarnings("unused")
|
||||||
private final Throttle retryThrottling;
|
private final Throttle retryThrottling;
|
||||||
@Nullable
|
@Nullable
|
||||||
private final Object loadBalancingConfig;
|
private final Object loadBalancingConfig;
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@ public final class ManagedChannelOrphanWrapperTest {
|
||||||
new ConcurrentHashMap<>();
|
new ConcurrentHashMap<>();
|
||||||
|
|
||||||
assertEquals(0, refs.size());
|
assertEquals(0, refs.size());
|
||||||
|
@SuppressWarnings("UnusedVariable")
|
||||||
ManagedChannelOrphanWrapper channel = new ManagedChannelOrphanWrapper(mc, refqueue, refs);
|
ManagedChannelOrphanWrapper channel = new ManagedChannelOrphanWrapper(mc, refqueue, refs);
|
||||||
assertEquals(1, refs.size());
|
assertEquals(1, refs.size());
|
||||||
|
|
||||||
|
|
@ -106,8 +107,11 @@ public final class ManagedChannelOrphanWrapperTest {
|
||||||
new ReferenceQueue<>();
|
new ReferenceQueue<>();
|
||||||
ConcurrentMap<ManagedChannelReference, ManagedChannelReference> refs =
|
ConcurrentMap<ManagedChannelReference, ManagedChannelReference> refs =
|
||||||
new ConcurrentHashMap<>();
|
new ConcurrentHashMap<>();
|
||||||
|
@SuppressWarnings("UnusedVariable")
|
||||||
ApplicationWithChannelRef app = new ApplicationWithChannelRef();
|
ApplicationWithChannelRef app = new ApplicationWithChannelRef();
|
||||||
|
@SuppressWarnings("UnusedVariable")
|
||||||
ChannelWithApplicationRef channelImpl = new ChannelWithApplicationRef();
|
ChannelWithApplicationRef channelImpl = new ChannelWithApplicationRef();
|
||||||
|
@SuppressWarnings("UnusedVariable")
|
||||||
ManagedChannelOrphanWrapper channel =
|
ManagedChannelOrphanWrapper channel =
|
||||||
new ManagedChannelOrphanWrapper(channelImpl, refqueue, refs);
|
new ManagedChannelOrphanWrapper(channelImpl, refqueue, refs);
|
||||||
app.channel = channel;
|
app.channel = channel;
|
||||||
|
|
@ -164,10 +168,12 @@ public final class ManagedChannelOrphanWrapperTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final class ApplicationWithChannelRef {
|
private static final class ApplicationWithChannelRef {
|
||||||
|
@SuppressWarnings("UnusedVariable")
|
||||||
private ManagedChannel channel;
|
private ManagedChannel channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final class ChannelWithApplicationRef extends TestManagedChannel {
|
private static final class ChannelWithApplicationRef extends TestManagedChannel {
|
||||||
|
@SuppressWarnings("UnusedVariable")
|
||||||
private ApplicationWithChannelRef application;
|
private ApplicationWithChannelRef application;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ public final class NettyClientInteropServlet extends HttpServlet {
|
||||||
LogEntryRecorder handler = new LogEntryRecorder();
|
LogEntryRecorder handler = new LogEntryRecorder();
|
||||||
Logger.getLogger("").addHandler(handler);
|
Logger.getLogger("").addHandler(handler);
|
||||||
try {
|
try {
|
||||||
doGetHelper(req, resp);
|
doGetHelper(resp);
|
||||||
} finally {
|
} finally {
|
||||||
Logger.getLogger("").removeHandler(handler);
|
Logger.getLogger("").removeHandler(handler);
|
||||||
}
|
}
|
||||||
|
|
@ -89,7 +89,7 @@ public final class NettyClientInteropServlet extends HttpServlet {
|
||||||
.append(handler.getLogOutput());
|
.append(handler.getLogOutput());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doGetHelper(HttpServletRequest req, HttpServletResponse resp) throws IOException {
|
private void doGetHelper(HttpServletResponse resp) throws IOException {
|
||||||
resp.setContentType("text/plain");
|
resp.setContentType("text/plain");
|
||||||
PrintWriter writer = resp.getWriter();
|
PrintWriter writer = resp.getWriter();
|
||||||
writer.println("Test invoked at: ");
|
writer.println("Test invoked at: ");
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,7 @@ final class JettyTlsUtil {
|
||||||
static synchronized Throwable getJettyAlpnUnavailabilityCause() {
|
static synchronized Throwable getJettyAlpnUnavailabilityCause() {
|
||||||
// This case should be unlikely
|
// This case should be unlikely
|
||||||
if (jettyAlpnUnavailabilityCause == null) {
|
if (jettyAlpnUnavailabilityCause == null) {
|
||||||
|
@SuppressWarnings("UnusedVariable")
|
||||||
boolean discard = isJettyAlpnConfigured();
|
boolean discard = isJettyAlpnConfigured();
|
||||||
}
|
}
|
||||||
return jettyAlpnUnavailabilityCause;
|
return jettyAlpnUnavailabilityCause;
|
||||||
|
|
@ -93,6 +94,7 @@ final class JettyTlsUtil {
|
||||||
static synchronized Throwable getJettyNpnUnavailabilityCause() {
|
static synchronized Throwable getJettyNpnUnavailabilityCause() {
|
||||||
// This case should be unlikely
|
// This case should be unlikely
|
||||||
if (jettyNpnUnavailabilityCause == null) {
|
if (jettyNpnUnavailabilityCause == null) {
|
||||||
|
@SuppressWarnings("UnusedVariable")
|
||||||
boolean discard = isJettyNpnConfigured();
|
boolean discard = isJettyNpnConfigured();
|
||||||
}
|
}
|
||||||
return jettyNpnUnavailabilityCause;
|
return jettyNpnUnavailabilityCause;
|
||||||
|
|
|
||||||
|
|
@ -366,6 +366,7 @@ public enum CipherSuite {
|
||||||
* @param sinceJavaVersion the first major Java release supporting this cipher suite.
|
* @param sinceJavaVersion the first major Java release supporting this cipher suite.
|
||||||
* @param sinceAndroidVersion the first Android SDK version supporting this cipher suite.
|
* @param sinceAndroidVersion the first Android SDK version supporting this cipher suite.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("UnusedVariable")
|
||||||
private CipherSuite(
|
private CipherSuite(
|
||||||
String javaName, int value, int rfc, int sinceJavaVersion, int sinceAndroidVersion) {
|
String javaName, int value, int rfc, int sinceJavaVersion, int sinceAndroidVersion) {
|
||||||
this.javaName = javaName;
|
this.javaName = javaName;
|
||||||
|
|
|
||||||
|
|
@ -120,6 +120,7 @@ public final class OkHostnameVerifier implements HostnameVerifier {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("MixedMutabilityReturnType")
|
||||||
public static List<String> allSubjectAltNames(X509Certificate certificate) {
|
public static List<String> allSubjectAltNames(X509Certificate certificate) {
|
||||||
List<String> altIpaNames = getSubjectAltNames(certificate, ALT_IPA_NAME);
|
List<String> altIpaNames = getSubjectAltNames(certificate, ALT_IPA_NAME);
|
||||||
List<String> altDnsNames = getSubjectAltNames(certificate, ALT_DNS_NAME);
|
List<String> altDnsNames = getSubjectAltNames(certificate, ALT_DNS_NAME);
|
||||||
|
|
@ -129,6 +130,7 @@ public final class OkHostnameVerifier implements HostnameVerifier {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("MixedMutabilityReturnType")
|
||||||
private static List<String> getSubjectAltNames(X509Certificate certificate, int type) {
|
private static List<String> getSubjectAltNames(X509Certificate certificate, int type) {
|
||||||
List<String> result = new ArrayList<>();
|
List<String> result = new ArrayList<>();
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -234,7 +234,8 @@ public final class Http2 implements Variant {
|
||||||
source.skip(padding);
|
source.skip(padding);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void readPriority(Handler handler, int length, byte flags, int streamId)
|
private void readPriority(
|
||||||
|
Handler handler, int length, @SuppressWarnings("UnusedVariable") byte flags, int streamId)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
if (length != 5) throw ioException("TYPE_PRIORITY length: %d != 5", length);
|
if (length != 5) throw ioException("TYPE_PRIORITY length: %d != 5", length);
|
||||||
if (streamId == 0) throw ioException("TYPE_PRIORITY streamId == 0");
|
if (streamId == 0) throw ioException("TYPE_PRIORITY streamId == 0");
|
||||||
|
|
@ -249,7 +250,8 @@ public final class Http2 implements Variant {
|
||||||
handler.priority(streamId, streamDependency, weight, exclusive);
|
handler.priority(streamId, streamDependency, weight, exclusive);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void readRstStream(Handler handler, int length, byte flags, int streamId)
|
private void readRstStream(
|
||||||
|
Handler handler, int length, @SuppressWarnings("UnusedVariable") byte flags, int streamId)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
if (length != 4) throw ioException("TYPE_RST_STREAM length: %d != 4", length);
|
if (length != 4) throw ioException("TYPE_RST_STREAM length: %d != 4", length);
|
||||||
if (streamId == 0) throw ioException("TYPE_RST_STREAM streamId == 0");
|
if (streamId == 0) throw ioException("TYPE_RST_STREAM streamId == 0");
|
||||||
|
|
@ -335,7 +337,8 @@ public final class Http2 implements Variant {
|
||||||
handler.ping(ack, payload1, payload2);
|
handler.ping(ack, payload1, payload2);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void readGoAway(Handler handler, int length, byte flags, int streamId)
|
private void readGoAway(
|
||||||
|
Handler handler, int length, @SuppressWarnings("UnusedVariable") byte flags, int streamId)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
if (length < 8) throw ioException("TYPE_GOAWAY length < 8: %s", length);
|
if (length < 8) throw ioException("TYPE_GOAWAY length < 8: %s", length);
|
||||||
if (streamId != 0) throw ioException("TYPE_GOAWAY streamId != 0");
|
if (streamId != 0) throw ioException("TYPE_GOAWAY streamId != 0");
|
||||||
|
|
@ -353,7 +356,8 @@ public final class Http2 implements Variant {
|
||||||
handler.goAway(lastStreamId, errorCode, debugData);
|
handler.goAway(lastStreamId, errorCode, debugData);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void readWindowUpdate(Handler handler, int length, byte flags, int streamId)
|
private void readWindowUpdate(
|
||||||
|
Handler handler, int length, @SuppressWarnings("UnusedVariable") byte flags, int streamId)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
if (length != 4) throw ioException("TYPE_WINDOW_UPDATE length !=4: %s", length);
|
if (length != 4) throw ioException("TYPE_WINDOW_UPDATE length !=4: %s", length);
|
||||||
long increment = (source.readInt() & 0x7fffffffL);
|
long increment = (source.readInt() & 0x7fffffffL);
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ dependencies {
|
||||||
compile project(':grpc-api'),
|
compile project(':grpc-api'),
|
||||||
libraries.protobuf_lite
|
libraries.protobuf_lite
|
||||||
compile (libraries.guava) {
|
compile (libraries.guava) {
|
||||||
// prefer 2.3.2 from libraries instead of 2.1.3
|
// prefer 2.3.3 from libraries instead of 2.1.3
|
||||||
exclude group: 'com.google.errorprone', module: 'error_prone_annotations'
|
exclude group: 'com.google.errorprone', module: 'error_prone_annotations'
|
||||||
// prefer 3.0.2 from libraries instead of 3.0.1
|
// prefer 3.0.2 from libraries instead of 3.0.1
|
||||||
exclude group: 'com.google.code.findbugs', module: 'jsr305'
|
exclude group: 'com.google.code.findbugs', module: 'jsr305'
|
||||||
|
|
|
||||||
|
|
@ -196,9 +196,9 @@ def com_google_code_gson():
|
||||||
def com_google_errorprone_error_prone_annotations():
|
def com_google_errorprone_error_prone_annotations():
|
||||||
jvm_maven_import_external(
|
jvm_maven_import_external(
|
||||||
name = "com_google_errorprone_error_prone_annotations",
|
name = "com_google_errorprone_error_prone_annotations",
|
||||||
artifact = "com.google.errorprone:error_prone_annotations:2.3.2",
|
artifact = "com.google.errorprone:error_prone_annotations:2.3.3",
|
||||||
server_urls = ["http://central.maven.org/maven2"],
|
server_urls = ["http://central.maven.org/maven2"],
|
||||||
artifact_sha256 = "357cd6cfb067c969226c442451502aee13800a24e950fdfde77bcdb4565a668d",
|
artifact_sha256 = "ec59f1b702d9afc09e8c3929f5c42777dec623a6ea2731ac694332c7d7680f5a",
|
||||||
licenses = ["notice"], # Apache 2.0
|
licenses = ["notice"], # Apache 2.0
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -532,8 +532,6 @@ public class ServerCallsTest {
|
||||||
private final MethodDescriptor<Integer, Integer> methodDescriptor;
|
private final MethodDescriptor<Integer, Integer> methodDescriptor;
|
||||||
private final List<Integer> requestCalls = new ArrayList<>();
|
private final List<Integer> requestCalls = new ArrayList<>();
|
||||||
private final List<Integer> responses = new ArrayList<>();
|
private final List<Integer> responses = new ArrayList<>();
|
||||||
private Metadata headers;
|
|
||||||
private Metadata trailers;
|
|
||||||
private Status status;
|
private Status status;
|
||||||
private boolean isCancelled;
|
private boolean isCancelled;
|
||||||
private boolean isReady;
|
private boolean isReady;
|
||||||
|
|
@ -549,7 +547,6 @@ public class ServerCallsTest {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendHeaders(Metadata headers) {
|
public void sendHeaders(Metadata headers) {
|
||||||
this.headers = headers;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -560,7 +557,6 @@ public class ServerCallsTest {
|
||||||
@Override
|
@Override
|
||||||
public void close(Status status, Metadata trailers) {
|
public void close(Status status, Metadata trailers) {
|
||||||
this.status = status;
|
this.status = status;
|
||||||
this.trailers = trailers;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue