Browse Source

FileSnapshot#toString: Suppress ReferenceEquality warnings

Reference comparison with EMPTY and MISSING_FILE is intended; these
are static instances used as markers, and will always be the same
instances.

Change-Id: Ic27f5b797bdb9370cf8f6b3b7bb3f1523d4a454c
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
stable-5.4
David Pursehouse 5 years ago
parent
commit
50c0275aba
  1. 2
      org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileSnapshot.java

2
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileSnapshot.java

@ -378,7 +378,7 @@ public class FileSnapshot {
}
/** {@inheritDoc} */
@SuppressWarnings("nls")
@SuppressWarnings({ "nls", "ReferenceEquality" })
@Override
public String toString() {
if (this == DIRTY) {

Loading…
Cancel
Save