--- old/src/java.base/unix/classes/sun/net/www/protocol/file/Handler.java 2018-12-06 17:25:53.549348850 -0500 +++ new/src/java.base/unix/classes/sun/net/www/protocol/file/Handler.java 2018-12-06 17:25:53.373347977 -0500 @@ -75,7 +75,7 @@ public synchronized URLConnection openConnection(URL u, Proxy p) throws IOException { String host = u.getHost(); - if (host == null || host.equals("") || host.equals("~") || + if (host == null || host.isEmpty() || host.equals("~") || host.equalsIgnoreCase("localhost")) { File file = new File(ParseUtil.decode(u.getPath())); return createFileURLConnection(u, file);