TransportHttp: Check for non-empty list with "!isEmpty()" rather than "size() > 0"
Change-Id: Iabb627c8f584346eb8ace3c24afb63b4d1ad3d47 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
This commit is contained in:
parent
9dc1ddf324
commit
b5a1b770a0
|
@ -641,7 +641,7 @@ void processResponseCookies(HttpConnection conn) {
|
|||
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 @@ protected HttpConnection httpOpen(String method, URL u,
|
|||
conn.setReadTimeout(effTimeOut);
|
||||
}
|
||||
// set cookie header if necessary
|
||||
if (relevantCookies.size() > 0) {
|
||||
if (!relevantCookies.isEmpty()) {
|
||||
setCookieHeader(conn);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue