diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2017-10-01 06:08:17 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2017-11-06 10:34:34 +0100 |
commit | 190b575be1fb78f1dc5d0be7f469c2b08f4d614d (patch) | |
tree | b9edad7b0c878a4f20d46bcaa858fc0c6497b3ca /org.eclipse.jgit.lfs.test | |
parent | 021e72b8011c6c0e1bc1f6b3c6494dc57f85f1a2 (diff) | |
download | jgit-190b575be1fb78f1dc5d0be7f469c2b08f4d614d.tar.gz jgit-190b575be1fb78f1dc5d0be7f469c2b08f4d614d.zip |
Suppress "Unlikely argument type for equals()" warnings in tests
This new warning was introduced in Eclipse 4.7 Oxygen [1].
The only instances of the warning are in test code that is asserting
that some class does not compare equal to Strings. As in the Gerrit
project [2] these asserts are arguably overkill, but arguably also
a reasonable test of an equals implementation. Ignore the warning in
these cases.
Note that if the project is opened in an earlier version of Eclipse,
a warning "Unsupported @SuppressWarnings" will be emitted.
[1] https://www.eclipse.org/eclipse/news/4.7/M6/
[2] https://gerrit-review.googlesource.com/#/c/gerrit/+/110339/
Change-Id: I08ea33d71e6009cf0f37e6492a475931f447256b
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.lfs.test')
-rw-r--r-- | org.eclipse.jgit.lfs.test/tst/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectIdTest.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/org.eclipse.jgit.lfs.test/tst/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectIdTest.java b/org.eclipse.jgit.lfs.test/tst/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectIdTest.java index 8938a7875d..2a8f66e4cc 100644 --- a/org.eclipse.jgit.lfs.test/tst/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectIdTest.java +++ b/org.eclipse.jgit.lfs.test/tst/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectIdTest.java @@ -587,6 +587,7 @@ public class AbbreviatedLongObjectIdTest { assertEquals(id.getFirstByte(), a.getFirstByte()); } + @SuppressWarnings("unlikely-arg-type") @Test public void testNotEquals() { AbbreviatedLongObjectId a = new LongObjectId(1L, 2L, 3L, 4L) |