< prev index next >

src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java

Print this page
rev 52979 : 8215281: Use String.isEmpty() when applicable in java.base
Reviewed-by: TBD

*** 3024,3034 **** if (SET_COOKIE.equalsIgnoreCase(name) || SET_COOKIE2.equalsIgnoreCase(name)) { // Filtering only if there is a cookie handler. [Assumption: the // cookie handler will store/retrieve the HttpOnly cookies] ! if (cookieHandler == null || value.length() == 0) return value; JavaNetHttpCookieAccess access = SharedSecrets.getJavaNetHttpCookieAccess(); StringJoiner retValue = new StringJoiner(","); // RFC 2965, comma separated --- 3024,3034 ---- if (SET_COOKIE.equalsIgnoreCase(name) || SET_COOKIE2.equalsIgnoreCase(name)) { // Filtering only if there is a cookie handler. [Assumption: the // cookie handler will store/retrieve the HttpOnly cookies] ! if (cookieHandler == null || value.isEmpty()) return value; JavaNetHttpCookieAccess access = SharedSecrets.getJavaNetHttpCookieAccess(); StringJoiner retValue = new StringJoiner(","); // RFC 2965, comma separated
< prev index next >