Use java.util.Objects instead of com.google.common.base.Objects
Use java.util.Objects.equals(...) instead of com.google.common.base.Objects.equal(...) and java.util.Objects.hash(...) instead of com.google.common.base.Objects.hashCode(...) . The JavaDoc of both methods in com.google.common.base.Objects says that they should be treated as deprecated and that the corresponding Java 7 methods in java.util.Objects should be used instead. Change-Id: I55d53cde42a7eecfa310e1ae4038d2ee4d111c4b Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
committed by
David Pursehouse
parent
b3a96b5ac5
commit
3efed75534
@@ -16,7 +16,6 @@ package com.google.gerrit.server.project;
|
||||
|
||||
import com.google.common.base.CharMatcher;
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.gerrit.common.ChangeHooks;
|
||||
import com.google.gerrit.extensions.api.projects.ProjectInput.ConfigValue;
|
||||
@@ -56,6 +55,7 @@ import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
@Singleton
|
||||
@@ -178,7 +178,7 @@ public class PutConfig implements RestModifyView<ProjectResource, Input> {
|
||||
ObjectId baseRev = projectConfig.getRevision();
|
||||
ObjectId commitRev = projectConfig.commit(md);
|
||||
// Only fire hook if project was actually changed.
|
||||
if (!Objects.equal(baseRev, commitRev)) {
|
||||
if (!Objects.equals(baseRev, commitRev)) {
|
||||
IdentifiedUser user = (IdentifiedUser) currentUser.get();
|
||||
hooks.doRefUpdatedHook(
|
||||
new Branch.NameKey(projectName, RefNames.REFS_CONFIG),
|
||||
|
||||
Reference in New Issue
Block a user