diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2017-08-17 23:15:30 +0100 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2017-08-18 10:01:06 +0100 |
commit | f79911e4a2a6766583c0d440a33d8807841bd68e (patch) | |
tree | 1950ef52a3346ffaa0c00dc7c555cf6fff7780cc /org.eclipse.jgit.lfs.test/tst | |
parent | 904e9f8b73dfac84726163b91e6464ee54ce5625 (diff) | |
download | jgit-f79911e4a2a6766583c0d440a33d8807841bd68e.tar.gz jgit-f79911e4a2a6766583c0d440a33d8807841bd68e.zip |
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 4886621261c3b5fa2d9c75fd72d19ac186c9f970.
Change-Id: Id3994e2d882a9d08bf548b7778406f8a80fbf830
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.lfs.test/tst')
-rw-r--r-- | org.eclipse.jgit.lfs.test/tst/org/eclipse/jgit/lfs/lib/LongObjectIdTest.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/org.eclipse.jgit.lfs.test/tst/org/eclipse/jgit/lfs/lib/LongObjectIdTest.java b/org.eclipse.jgit.lfs.test/tst/org/eclipse/jgit/lfs/lib/LongObjectIdTest.java index e754d6f744..31ab783e2a 100644 --- a/org.eclipse.jgit.lfs.test/tst/org/eclipse/jgit/lfs/lib/LongObjectIdTest.java +++ b/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"))); |