Upgrade Guava to 22.0

The dead lock issue is fixed: [1].

[1] https://github.com/google/guava/issues/2743

Bug: Issue 7645
Change-Id: I77dd930503e6869be207ca4a4f2fd85116719506
This commit is contained in:
Paladox none 2017-11-02 17:35:24 +00:00
parent 0659818db8
commit dd2ae2d0c6
10 changed files with 11 additions and 2 deletions

View File

@ -91,6 +91,7 @@ public class HostPageServlet extends HttpServlet {
private volatile Page page;
@Inject
@SuppressWarnings("deprecation") // Use Hashing.md5 for compatibility.
HostPageServlet(
Provider<CurrentUser> cu,
SitePaths sp,

View File

@ -307,6 +307,7 @@ public abstract class ResourceServlet extends HttpServlet {
final String etag;
final byte[] raw;
@SuppressWarnings("deprecation") // Use Hashing.md5 for compatibility.
Resource(FileTime lastModified, String contentType, byte[] raw) {
this.lastModified = checkNotNull(lastModified, "lastModified");
this.contentType = checkNotNull(contentType, "contentType");

View File

@ -274,6 +274,7 @@ class LibraryDownloader {
}
}
@SuppressWarnings("deprecation") // Use Hashing.sha1 for compatibility.
private void verifyFileChecksum() {
if (sha1 == null) {
System.err.println();

View File

@ -116,6 +116,7 @@ public abstract class ExternalId implements Serializable {
* Returns the SHA1 of the external ID that is used as note ID in the refs/meta/external-ids
* notes branch.
*/
@SuppressWarnings("deprecation") // Use Hashing.sha1 for compatibility.
public ObjectId sha1() {
return ObjectId.fromRaw(Hashing.sha1().hashString(get(), UTF_8).asBytes());
}

View File

@ -117,6 +117,7 @@ public class ChangeResource implements RestResource, HasETag {
}
@Override
@SuppressWarnings("deprecation") // Use Hashing.md5 for compatibility.
public String getETag() {
CurrentUser user = control.getUser();
Hasher h = Hashing.md5().newHasher();

View File

@ -235,6 +235,7 @@ public class FileContentUtil {
}
}
@SuppressWarnings("deprecation") // Use Hashing.md5 for compatibility.
private static String randSuffix() {
// Produce a random suffix that is difficult (or nearly impossible)
// for an attacker to guess in advance. This reduces the risk that

View File

@ -62,6 +62,7 @@ public class GetRevisionActions implements ETagView<RevisionResource> {
}
@Override
@SuppressWarnings("deprecation") // Use Hashing.md5 for compatibility.
public String getETag(RevisionResource rsrc) {
Hasher h = Hashing.md5().newHasher();
CurrentUser user = rsrc.getControl().getUser();

View File

@ -653,6 +653,7 @@ public class PostReview implements RestModifyView<RevisionResource, ReviewInput>
filename, patchSetId, line, side, message, range);
}
@SuppressWarnings("deprecation") // Use Hashing.sha1 for compatibility.
public static CommentSetEntry create(Comment comment) {
return create(
comment.key.filename,

View File

@ -46,6 +46,7 @@ public class RequestId {
private final String str;
@SuppressWarnings("deprecation") // Use Hashing.sha1 for compatibility.
private RequestId(String resourceId) {
Hasher h = Hashing.sha1().newHasher();
h.putLong(Thread.currentThread().getId()).putUnencodedChars(MACHINE_ID);

View File

@ -1,5 +1,5 @@
GUAVA_VERSION = "21.0"
GUAVA_VERSION = "22.0"
GUAVA_BIN_SHA1 = "3a3d111be1be1b745edfa7d91678a12d7ed38709"
GUAVA_BIN_SHA1 = "3564ef3803de51fb0530a8377ec6100b33b0d073"
GUAVA_DOC_URL = "https://google.github.io/guava/releases/" + GUAVA_VERSION + "/api/docs/"