--- old/src/java.base/share/classes/sun/security/provider/PolicyFile.java 2018-12-06 17:53:00.409416014 -0500 +++ new/src/java.base/share/classes/sun/security/provider/PolicyFile.java 2018-12-06 17:53:00.237415161 -0500 @@ -1608,7 +1608,7 @@ if (u.getProtocol().equals("file")) { boolean isLocalFile = false; String host = u.getHost(); - isLocalFile = (host == null || host.equals("") || + isLocalFile = (host == null || host.isEmpty() || host.equals("~") || host.equalsIgnoreCase("localhost")); if (isLocalFile) {