--- old/src/java.base/unix/classes/sun/net/www/protocol/file/Handler.java 2018-12-06 17:53:03.461431148 -0500 +++ new/src/java.base/unix/classes/sun/net/www/protocol/file/Handler.java 2018-12-06 17:53:03.297430334 -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);