diff --git a/benchmarks/src/main/java/io/grpc/benchmarks/qps/AbstractConfigurationBuilder.java b/benchmarks/src/main/java/io/grpc/benchmarks/qps/AbstractConfigurationBuilder.java index 639d2f00cd..b9eed9c452 100644 --- a/benchmarks/src/main/java/io/grpc/benchmarks/qps/AbstractConfigurationBuilder.java +++ b/benchmarks/src/main/java/io/grpc/benchmarks/qps/AbstractConfigurationBuilder.java @@ -212,7 +212,7 @@ public abstract class AbstractConfigurationBuilder private static String wordWrap(String text, int startPos, int maxPos) { StringBuilder builder = new StringBuilder(); int pos = startPos; - String[] parts = text.split("\\n"); + String[] parts = text.split("\\n", -1); boolean isBulleted = parts.length > 1; for (String part : parts) { int lineStart = startPos; diff --git a/build.gradle b/build.gradle index 80e0debc67..48b76b47e8 100644 --- a/build.gradle +++ b/build.gradle @@ -35,7 +35,7 @@ subprojects { dependencies { // The ErrorProne plugin defaults to the latest, which would break our // build if error prone releases a new version with a new check - errorprone 'com.google.errorprone:error_prone_core:2.1.3' + errorprone 'com.google.errorprone:error_prone_core:2.2.0' apt 'com.google.guava:guava-beta-checker:1.0' } } else { diff --git a/core/src/main/java/io/grpc/internal/Http2ClientStreamTransportState.java b/core/src/main/java/io/grpc/internal/Http2ClientStreamTransportState.java index 503778945b..ea22432e5b 100644 --- a/core/src/main/java/io/grpc/internal/Http2ClientStreamTransportState.java +++ b/core/src/main/java/io/grpc/internal/Http2ClientStreamTransportState.java @@ -226,7 +226,7 @@ public abstract class Http2ClientStreamTransportState extends AbstractClientStre private static Charset extractCharset(Metadata headers) { String contentType = headers.get(GrpcUtil.CONTENT_TYPE_KEY); if (contentType != null) { - String[] split = contentType.split("charset="); + String[] split = contentType.split("charset=", 2); try { return Charset.forName(split[split.length - 1].trim()); } catch (Exception t) { diff --git a/interop-testing/src/main/java/io/grpc/testing/integration/AbstractInteropTest.java b/interop-testing/src/main/java/io/grpc/testing/integration/AbstractInteropTest.java index f7bdeb8d98..af962af463 100644 --- a/interop-testing/src/main/java/io/grpc/testing/integration/AbstractInteropTest.java +++ b/interop-testing/src/main/java/io/grpc/testing/integration/AbstractInteropTest.java @@ -1725,7 +1725,8 @@ public abstract class AbstractInteropTest { try { certificates = Arrays.asList(sslSession.getPeerCertificates()); } catch (SSLPeerUnverifiedException e) { - fail("No cert"); + // Should never happen + throw new AssertionError(e); } X509Certificate x509cert = (X509Certificate) certificates.get(0);