Upgrade the version of google/errorprone plug-in

This CL upgraded google/errorprone plug-in to 2.3.3 and resolved
some warnings detected from the plug-in.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=238047862
This commit is contained in:
shicong 2019-03-12 10:41:49 -07:00 committed by Ben McIlwain
parent 50e0a9b532
commit bc3bdc7347
22 changed files with 119 additions and 105 deletions

View file

@ -38,14 +38,17 @@ public class UrlFetchException extends RuntimeException {
}
@Override
public String toString() {
StringBuilder res = new StringBuilder(2048 + rsp.getContent().length).append(String.format(
"%s: %s (HTTP Status %d)\nX-Fetch-URL: %s\nX-Final-URL: %s\n",
getClass().getSimpleName(),
getMessage(),
rsp.getResponseCode(),
req.getURL().toString(),
rsp.getFinalUrl()));
public String getMessage() {
StringBuilder res =
new StringBuilder(2048 + rsp.getContent().length)
.append(
String.format(
"%s: %s (HTTP Status %d)\nX-Fetch-URL: %s\nX-Final-URL: %s\n",
getClass().getSimpleName(),
super.getMessage(),
rsp.getResponseCode(),
req.getURL().toString(),
rsp.getFinalUrl()));
for (HTTPHeader header : rsp.getHeadersUncombined()) {
res.append(header.getName());
res.append(": ");