diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2019-06-16 13:35:35 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2019-06-17 08:18:12 +0900 |
commit | 9e499dad6d92aeee4810446c2c286155149bc5e2 (patch) | |
tree | 56ec5de9214f65f6bea0cfa2dcbfe57179981b23 /org.eclipse.jgit/src | |
parent | 50c0275abaf3574f4018d9d4b47b37faeb0d8852 (diff) | |
download | jgit-9e499dad6d92aeee4810446c2c286155149bc5e2.tar.gz jgit-9e499dad6d92aeee4810446c2c286155149bc5e2.zip |
PacketLineIn: Suppress comparison warnings for END and DELIM
Reference comparison is intentional. The END and DELIM string
constants are used as sentinels and will always be the same
instances.
Suppress both ReferenceEquality and StringEquality warnings.
Change-Id: I4ce0495702c56b3911f42f26c2f81d28073cbe19
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit/src')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineIn.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineIn.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineIn.java index 90f1b373ba..d73e1939a6 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineIn.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineIn.java @@ -259,6 +259,7 @@ public class PacketLineIn { * @return true if the given string is {@link #DELIM}, otherwise false. * @since 5.4 */ + @SuppressWarnings({ "ReferenceEquality", "StringEquality" }) public static boolean isDelimiter(String s) { return s == DELIM; } @@ -293,6 +294,7 @@ public class PacketLineIn { * @return true if the given string is {@link #END}, otherwise false. * @since 5.4 */ + @SuppressWarnings({ "ReferenceEquality", "StringEquality" }) public static boolean isEnd(String s) { return s == END; } |