diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2019-06-07 10:59:46 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2019-06-07 10:59:46 +0900 |
commit | b5a1b770a05848983688b81b5318f6ce15ead68d (patch) | |
tree | 5f2f62f3146ca2a8926d4b4eb851a1b148a812f4 | |
parent | 9dc1ddf324c0f5ff37cd3ff47c8b16595012004b (diff) | |
download | jgit-b5a1b770a05848983688b81b5318f6ce15ead68d.tar.gz jgit-b5a1b770a05848983688b81b5318f6ce15ead68d.zip |
TransportHttp: Check for non-empty list with "!isEmpty()" rather than "size() > 0"
Change-Id: Iabb627c8f584346eb8ace3c24afb63b4d1ad3d47
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java | 4 |
1 files changed, 2 insertions, 2 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 88349a7ee5..27ab879515 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java @@ -641,7 +641,7 @@ public class TransportHttp extends HttpTransport implements WalkTransport, foundCookies.addAll( extractCookies(HDR_SET_COOKIE2, cookieHeaderValues)); } - if (foundCookies.size() > 0) { + if (!foundCookies.isEmpty()) { try { // update cookie lists with the newly received cookies! Set<HttpCookie> cookies = cookieFile.getCookies(false); @@ -929,7 +929,7 @@ public class TransportHttp extends HttpTransport implements WalkTransport, conn.setReadTimeout(effTimeOut); } // set cookie header if necessary - if (relevantCookies.size() > 0) { + if (!relevantCookies.isEmpty()) { setCookieHeader(conn); } |