< prev index next >

src/java.base/windows/classes/sun/net/www/protocol/jar/JarFileFactory.java

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

*** 74,84 **** JarFile get(URL url, boolean useCaches) throws IOException { if (url.getProtocol().equalsIgnoreCase("file")) { // Deal with UNC pathnames specially. See 4180841 String host = url.getHost(); ! if (host != null && !host.equals("") && !host.equalsIgnoreCase("localhost")) { url = new URL("file", "", "//" + host + url.getPath()); } } --- 74,84 ---- JarFile get(URL url, boolean useCaches) throws IOException { if (url.getProtocol().equalsIgnoreCase("file")) { // Deal with UNC pathnames specially. See 4180841 String host = url.getHost(); ! if (host != null && !host.isEmpty() && !host.equalsIgnoreCase("localhost")) { url = new URL("file", "", "//" + host + url.getPath()); } }
< prev index next >