Skip to content

Commit f79911e

Browse files
committed
LongObjectIdTest: Add back self comparison test
The test was removed in 4886621 to prevent a warning from error-prone. Add it back but rewrite it in a way that does not cause the warning. This reverts commit 4886621. Change-Id: Id3994e2d882a9d08bf548b7778406f8a80fbf830 Signed-off-by: David Pursehouse <[email protected]>
1 parent 904e9f8 commit f79911e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

org.eclipse.jgit.lfs.test/tst/org/eclipse/jgit/lfs/lib/LongObjectIdTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,8 @@ public void testCompareTo() {
291291
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef");
292292
assertEquals(0, id1.compareTo(LongObjectId.fromString(
293293
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef")));
294+
AnyLongObjectId self = id1;
295+
assertEquals(0, id1.compareTo(self));
294296

295297
assertEquals(-1, id1.compareTo(LongObjectId.fromString(
296298
"1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef")));

0 commit comments

Comments
 (0)