diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2019-06-16 16:28:02 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2019-06-17 09:40:11 +0900 |
commit | 430be8930764260ac7087c37efc9bee52055aa6a (patch) | |
tree | 85e5713f6c027e6e4a30ecc82baab39468c76b21 /org.eclipse.jgit.lfs/src/org/eclipse | |
parent | 13696b8d8c120bf2327b173ad5e8adfa3eb9e6ed (diff) | |
download | jgit-430be8930764260ac7087c37efc9bee52055aa6a.tar.gz jgit-430be8930764260ac7087c37efc9bee52055aa6a.zip |
Error Prone: Increase severity of NonOverridingEquals to ERROR
Error Prone reports the warning on several classes:
[NonOverridingEquals] equals method doesn't override Object.equals;
if this is a type-specific helper for a method that does override
Object.equals, either inline it into the callers or rename it to
avoid ambiguity.
See https://errorprone.info/bugpattern/NonOverridingEquals
Most of these are in the public API, so we can't rename or inline them
without breaking the API. FileSnapshot is not part of the public API,
but clients may be using it anyway, so we also shouldn't change that.
Suppress all the warnings instead. Having the check at severity ERROR
will at least make sure we don't introduce any new occurrences.
Change-Id: I92345c11256f06b4fa03ccc13337f72af5a43591
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.lfs/src/org/eclipse')
-rw-r--r-- | org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java index 0788922639..e6fe7408a8 100644 --- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java +++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java @@ -274,6 +274,7 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> { * the other id to compare to. May be null. * @return true only if both LongObjectIds have identical bits. */ + @SuppressWarnings("NonOverridingEquals") public final boolean equals(AnyLongObjectId other) { return other != null ? equals(this, other) : false; } |