< prev index next >

src/java.base/share/classes/sun/security/provider/PolicyFile.java

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

*** 1606,1616 **** } } if (u.getProtocol().equals("file")) { boolean isLocalFile = false; String host = u.getHost(); ! isLocalFile = (host == null || host.equals("") || host.equals("~") || host.equalsIgnoreCase("localhost")); if (isLocalFile) { path = u.getFile().replace('/', File.separatorChar); path = ParseUtil.decode(path); --- 1606,1616 ---- } } if (u.getProtocol().equals("file")) { boolean isLocalFile = false; String host = u.getHost(); ! isLocalFile = (host == null || host.isEmpty() || host.equals("~") || host.equalsIgnoreCase("localhost")); if (isLocalFile) { path = u.getFile().replace('/', File.separatorChar); path = ParseUtil.decode(path);
< prev index next >