mirror of
https://github.com/apache/httpcomponents-client.git
synced 2025-02-17 07:26:47 +00:00
Use "String.isEmpty()" instead of "String.length() == 0"
This commit is contained in:
parent
0c0e9c7b7c
commit
7875ab19df
@ -129,7 +129,7 @@ public final List<Cookie> parse(final Header header, final CookieOrigin origin)
|
|||||||
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()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user