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
@@ -20,7 +20,6 @@ import static java.util.concurrent.TimeUnit.MINUTES;
|
||||
import static java.util.concurrent.TimeUnit.SECONDS;
|
||||
import static org.eclipse.jgit.lib.RefDatabase.ALL;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.ArrayListMultimap;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.ListMultimap;
|
||||
@@ -97,6 +96,7 @@ import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
@@ -1058,8 +1058,8 @@ public class MergeOp {
|
||||
try {
|
||||
ChangeMessage last = Iterables.getLast(cmUtil.byChange(db, notes));
|
||||
if (last != null) {
|
||||
if (Objects.equal(last.getAuthor(), msg.getAuthor())
|
||||
&& Objects.equal(last.getMessage(), msg.getMessage())) {
|
||||
if (Objects.equals(last.getAuthor(), msg.getAuthor())
|
||||
&& Objects.equals(last.getMessage(), msg.getMessage())) {
|
||||
long lastMs = last.getWrittenOn().getTime();
|
||||
long msgMs = msg.getWrittenOn().getTime();
|
||||
long sinceMs = msgMs - lastMs;
|
||||
|
Reference in New Issue
Block a user