Fix deprecation warnings caused by Guava upgrade
Replace Objects.firstNonNull() with MoreObjects.firstNonNull(). Change-Id: I657a532562ca598aca4130f4e55fdfde72fa4434
This commit is contained in:
committed by
David Pursehouse
parent
7d76f7d348
commit
ac332d22f5
@@ -14,7 +14,7 @@
|
||||
|
||||
package com.google.gerrit.server.change;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.google.common.hash.Hasher;
|
||||
import com.google.common.hash.Hashing;
|
||||
import com.google.gerrit.extensions.restapi.RestResource;
|
||||
@@ -70,7 +70,7 @@ public class ChangeResource implements RestResource, HasETag {
|
||||
byte[] buf = new byte[20];
|
||||
for (ProjectState p : control.getProjectControl().getProjectState().tree()) {
|
||||
ObjectId id = p.getConfig().getRevision();
|
||||
Objects.firstNonNull(id, ObjectId.zeroId()).copyRawTo(buf, 0);
|
||||
MoreObjects.firstNonNull(id, ObjectId.zeroId()).copyRawTo(buf, 0);
|
||||
h.putBytes(buf);
|
||||
}
|
||||
return h.hash().toString();
|
||||
|
||||
Reference in New Issue
Block a user