aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst/org/eclipse/jgit
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.test/tst/org/eclipse/jgit
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.test/tst/org/eclipse/jgit')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollectorTest.java2
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevObjectTest.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollectorTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollectorTest.java
index bfa30d5b4b..5a5ae1d7a3 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollectorTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollectorTest.java
@@ -976,7 +976,7 @@ public class DfsGarbageCollectorTest {
rw.markStart(rw.parseCommit(ref.getObjectId()));
}
for (RevCommit next; (next = rw.next()) != null;) {
- if (AnyObjectId.equals(next, id)) {
+ if (AnyObjectId.isEqual(next, id)) {
return true;
}
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevObjectTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevObjectTest.java
index 4969305de0..e3972207f7 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevObjectTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevObjectTest.java
@@ -89,8 +89,8 @@ public class RevObjectTest extends RevWalkTestCase {
assertEquals(a1.hashCode(), a2.hashCode());
assertEquals(b1.hashCode(), b2.hashCode());
- assertTrue(AnyObjectId.equals(a1, a2));
- assertTrue(AnyObjectId.equals(b1, b2));
+ assertTrue(AnyObjectId.isEqual(a1, a2));
+ assertTrue(AnyObjectId.isEqual(b1, b2));
}
@Test