aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/VerifyReftable.java
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2019-08-08 15:09:46 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2019-08-08 23:39:23 +0200
commit8f7e8513463487cfbcd41e40a684abec9ec10778 (patch)
tree2a0b9817aeab3f144d2f4c9954c54071fed54f97 /org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/VerifyReftable.java
parent2f8911181b1d678e2e54b0863dd454e27f395cb3 (diff)
downloadjgit-8f7e8513463487cfbcd41e40a684abec9ec10778.tar.gz
jgit-8f7e8513463487cfbcd41e40a684abec9ec10778.zip
[error prone] suppress AmbiguousMethodReference in AnyObjectId
Move the implementation of the static equals() method to a new method and suppress the error. Deprecate the old method to signal that we intend to remove it in the next major release. See https://errorprone.info/bugpattern/AmbiguousMethodReference Change-Id: I5e29c97f4db3e11770be589a6ccd785e2c9ac7f2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/VerifyReftable.java')
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/VerifyReftable.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/VerifyReftable.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/VerifyReftable.java
index b38de14af9..15b6ff9a9a 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/VerifyReftable.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/VerifyReftable.java
@@ -189,7 +189,7 @@ class VerifyReftable extends TextBuiltin {
return;
}
- if (!AnyObjectId.equals(exp.getObjectId(), act.getObjectId())) {
+ if (!AnyObjectId.isEqual(exp.getObjectId(), act.getObjectId())) {
throw die(String.format("expected %s to be %s, found %s",
exp.getName(),
id(exp.getObjectId()),
@@ -197,7 +197,8 @@ class VerifyReftable extends TextBuiltin {
}
if (exp.getPeeledObjectId() != null
- && !AnyObjectId.equals(exp.getPeeledObjectId(), act.getPeeledObjectId())) {
+ && !AnyObjectId.isEqual(exp.getPeeledObjectId(),
+ act.getPeeledObjectId())) {
throw die(String.format("expected %s to be %s, found %s",
exp.getName(),
id(exp.getPeeledObjectId()),