Browse Source

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 4886621261.

Change-Id: Id3994e2d882a9d08bf548b7778406f8a80fbf830
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
stable-4.9
David Pursehouse 7 years ago
parent
commit
f79911e4a2
  1. 2
      org.eclipse.jgit.lfs.test/tst/org/eclipse/jgit/lfs/lib/LongObjectIdTest.java

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

@ -291,6 +291,8 @@ public class LongObjectIdTest {
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef");
assertEquals(0, id1.compareTo(LongObjectId.fromString(
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef")));
AnyLongObjectId self = id1;
assertEquals(0, id1.compareTo(self));
assertEquals(-1, id1.compareTo(LongObjectId.fromString(
"1123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef")));

Loading…
Cancel
Save