--- a/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java Thu Dec 13 16:14:07 2018 +0100
+++ b/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java Thu Dec 13 15:31:05 2018 +0100
@@ -3026,7 +3026,7 @@
// Filtering only if there is a cookie handler. [Assumption: the
// cookie handler will store/retrieve the HttpOnly cookies]
- if (cookieHandler == null || value.length() == 0)
+ if (cookieHandler == null || value.isEmpty())
return value;
JavaNetHttpCookieAccess access =