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:
@@ -91,6 +91,7 @@ public class HostPageServlet extends HttpServlet {
|
|||||||
private volatile Page page;
|
private volatile Page page;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
@SuppressWarnings("deprecation") // Use Hashing.md5 for compatibility.
|
||||||
HostPageServlet(
|
HostPageServlet(
|
||||||
Provider<CurrentUser> cu,
|
Provider<CurrentUser> cu,
|
||||||
SitePaths sp,
|
SitePaths sp,
|
||||||
|
@@ -307,6 +307,7 @@ public abstract class ResourceServlet extends HttpServlet {
|
|||||||
final String etag;
|
final String etag;
|
||||||
final byte[] raw;
|
final byte[] raw;
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation") // Use Hashing.md5 for compatibility.
|
||||||
Resource(FileTime lastModified, String contentType, byte[] raw) {
|
Resource(FileTime lastModified, String contentType, byte[] raw) {
|
||||||
this.lastModified = checkNotNull(lastModified, "lastModified");
|
this.lastModified = checkNotNull(lastModified, "lastModified");
|
||||||
this.contentType = checkNotNull(contentType, "contentType");
|
this.contentType = checkNotNull(contentType, "contentType");
|
||||||
|
@@ -274,6 +274,7 @@ class LibraryDownloader {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation") // Use Hashing.sha1 for compatibility.
|
||||||
private void verifyFileChecksum() {
|
private void verifyFileChecksum() {
|
||||||
if (sha1 == null) {
|
if (sha1 == null) {
|
||||||
System.err.println();
|
System.err.println();
|
||||||
|
@@ -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
|
* Returns the SHA1 of the external ID that is used as note ID in the refs/meta/external-ids
|
||||||
* notes branch.
|
* notes branch.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("deprecation") // Use Hashing.sha1 for compatibility.
|
||||||
public ObjectId sha1() {
|
public ObjectId sha1() {
|
||||||
return ObjectId.fromRaw(Hashing.sha1().hashString(get(), UTF_8).asBytes());
|
return ObjectId.fromRaw(Hashing.sha1().hashString(get(), UTF_8).asBytes());
|
||||||
}
|
}
|
||||||
|
@@ -117,6 +117,7 @@ public class ChangeResource implements RestResource, HasETag {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SuppressWarnings("deprecation") // Use Hashing.md5 for compatibility.
|
||||||
public String getETag() {
|
public String getETag() {
|
||||||
CurrentUser user = control.getUser();
|
CurrentUser user = control.getUser();
|
||||||
Hasher h = Hashing.md5().newHasher();
|
Hasher h = Hashing.md5().newHasher();
|
||||||
|
@@ -235,6 +235,7 @@ public class FileContentUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation") // Use Hashing.md5 for compatibility.
|
||||||
private static String randSuffix() {
|
private static String randSuffix() {
|
||||||
// Produce a random suffix that is difficult (or nearly impossible)
|
// Produce a random suffix that is difficult (or nearly impossible)
|
||||||
// for an attacker to guess in advance. This reduces the risk that
|
// for an attacker to guess in advance. This reduces the risk that
|
||||||
|
@@ -62,6 +62,7 @@ public class GetRevisionActions implements ETagView<RevisionResource> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SuppressWarnings("deprecation") // Use Hashing.md5 for compatibility.
|
||||||
public String getETag(RevisionResource rsrc) {
|
public String getETag(RevisionResource rsrc) {
|
||||||
Hasher h = Hashing.md5().newHasher();
|
Hasher h = Hashing.md5().newHasher();
|
||||||
CurrentUser user = rsrc.getControl().getUser();
|
CurrentUser user = rsrc.getControl().getUser();
|
||||||
|
@@ -653,6 +653,7 @@ public class PostReview implements RestModifyView<RevisionResource, ReviewInput>
|
|||||||
filename, patchSetId, line, side, message, range);
|
filename, patchSetId, line, side, message, range);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation") // Use Hashing.sha1 for compatibility.
|
||||||
public static CommentSetEntry create(Comment comment) {
|
public static CommentSetEntry create(Comment comment) {
|
||||||
return create(
|
return create(
|
||||||
comment.key.filename,
|
comment.key.filename,
|
||||||
|
@@ -46,6 +46,7 @@ public class RequestId {
|
|||||||
|
|
||||||
private final String str;
|
private final String str;
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation") // Use Hashing.sha1 for compatibility.
|
||||||
private RequestId(String resourceId) {
|
private RequestId(String resourceId) {
|
||||||
Hasher h = Hashing.sha1().newHasher();
|
Hasher h = Hashing.sha1().newHasher();
|
||||||
h.putLong(Thread.currentThread().getId()).putUnencodedChars(MACHINE_ID);
|
h.putLong(Thread.currentThread().getId()).putUnencodedChars(MACHINE_ID);
|
||||||
|
@@ -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/"
|
GUAVA_DOC_URL = "https://google.github.io/guava/releases/" + GUAVA_VERSION + "/api/docs/"
|
||||||
|
Reference in New Issue
Block a user