Suppress self-comparison error-prone warning

We intentionally self-compare to test correctness.
This commit is contained in:
Andrew Gaul 2017-07-04 11:15:51 -07:00
parent d36812e5a6
commit 84653bac65
1 changed files with 1 additions and 0 deletions

View File

@ -223,6 +223,7 @@ public class IpPermissionTest {
assertTrue(first.compareTo(second) == 0, first + " does not compare zero to " + second);
}
@SuppressWarnings("SelfComparison")
private static void assertOrder(IpPermission smaller, IpPermission bigger) {
assertTrue(smaller.compareTo(bigger) < 0, smaller + " does not compare less than " + bigger);
assertTrue(bigger.compareTo(smaller) > 0, bigger + " does not compare greater than " + smaller);