From 7875ab19df790a09e84e06a1cf156d312daea352 Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Thu, 12 Jul 2018 09:06:57 -0600 Subject: [PATCH] Use "String.isEmpty()" instead of "String.length() == 0" --- .../apache/hc/client5/http/impl/cookie/RFC6265CookieSpec.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/cookie/RFC6265CookieSpec.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/cookie/RFC6265CookieSpec.java index 08b0317ce..3af14c34c 100644 --- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/cookie/RFC6265CookieSpec.java +++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/cookie/RFC6265CookieSpec.java @@ -129,7 +129,7 @@ public class RFC6265CookieSpec implements CookieSpec { cursor = new ParserCursor(0, buffer.length()); } final String name = tokenParser.parseToken(buffer, cursor, TOKEN_DELIMS); - if (name.length() == 0) { + if (name.isEmpty()) { return Collections.emptyList(); } if (cursor.atEnd()) {