< prev index next >

src/java.net.http/share/classes/jdk/internal/net/http/ResponseContent.java

Print this page
rev 52881 : 8214971: Replace use of string.equals("") with isEmpty()
Reviewed-by: jlaskey, prappo, lancea, dfuchs, redestad

*** 82,92 **** return chunkedContent; } if (contentLength == -1) { String tc = headers.firstValue("Transfer-Encoding") .orElse(""); ! if (!tc.equals("")) { if (tc.equalsIgnoreCase("chunked")) { chunkedContent = true; } else { throw new IOException("invalid content"); } --- 82,92 ---- return chunkedContent; } if (contentLength == -1) { String tc = headers.firstValue("Transfer-Encoding") .orElse(""); ! if (!tc.isEmpty()) { if (tc.equalsIgnoreCase("chunked")) { chunkedContent = true; } else { throw new IOException("invalid content"); }
< prev index next >