diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2019-06-07 10:57:15 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2019-06-07 10:57:15 +0900 |
commit | 9dc1ddf324c0f5ff37cd3ff47c8b16595012004b (patch) | |
tree | d5e9435103f1118be2ec8ea4a64bc57c71405372 | |
parent | 6518d63317a8fda856a801cef71db9de1b1052fb (diff) | |
download | jgit-9dc1ddf324c0f5ff37cd3ff47c8b16595012004b.tar.gz jgit-9dc1ddf324c0f5ff37cd3ff47c8b16595012004b.zip |
TransportHttp: Fix comparison of size with ">= 0"
Error Prone reports:
[SizeGreaterThanOrEqualsZero] Comparison of a size >= 0 is always true,
did you intend to check for non-emptiness?
see https://errorprone.info/bugpattern/SizeGreaterThanOrEqualsZero
Change-Id: Ie964771cacca4b15569eb45f6e273ad2a7e2e49c
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java index f44a99b8b4..88349a7ee5 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java @@ -952,7 +952,7 @@ public class TransportHttp extends HttpTransport implements WalkTransport, cookieHeaderValue.append(cookie.toString()); } } - if (cookieHeaderValue.length() >= 0) { + if (cookieHeaderValue.length() > 0) { conn.setRequestProperty(HDR_COOKIE, cookieHeaderValue.toString()); } } |