Use "String.isEmpty()" instead of "String.length() == 0"

This commit is contained in:
Gary Gregory 2018-07-12 09:06:57 -06:00
parent 0c0e9c7b7c
commit 7875ab19df
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ public class RFC6265CookieSpec implements CookieSpec {
cursor = new ParserCursor(0, buffer.length()); cursor = new ParserCursor(0, buffer.length());
} }
final String name = tokenParser.parseToken(buffer, cursor, TOKEN_DELIMS); final String name = tokenParser.parseToken(buffer, cursor, TOKEN_DELIMS);
if (name.length() == 0) { if (name.isEmpty()) {
return Collections.emptyList(); return Collections.emptyList();
} }
if (cursor.atEnd()) { if (cursor.atEnd()) {