mirror of https://github.com/grpc/grpc-java.git
Update ErrorProne to 2.2.0 and fix failures
This commit is contained in:
parent
16cec947c5
commit
af0283477d
|
@ -212,7 +212,7 @@ public abstract class AbstractConfigurationBuilder<T extends Configuration>
|
|||
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;
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue