diff -r e10a1f7aaa13 -r 8bf9268df0e2 src/java.base/share/classes/sun/security/provider/ConfigFile.java --- a/src/java.base/share/classes/sun/security/provider/ConfigFile.java Thu Dec 13 16:14:07 2018 +0100 +++ b/src/java.base/share/classes/sun/security/provider/ConfigFile.java Thu Dec 13 15:31:05 2018 +0100 @@ -626,7 +626,7 @@ return url.openStream(); } catch (Exception e) { String file = url.getPath(); - if (url.getHost().length() > 0) { // For Windows UNC + if (!url.getHost().isEmpty()) { // For Windows UNC file = "//" + url.getHost() + file; } if (debugConfig != null) { @@ -651,7 +651,7 @@ return value; } String s = PropertyExpander.expand(value); - if (s == null || s.length() == 0) { + if (s == null || s.isEmpty()) { throw ioException( "Configuration.Error.Line.line.system.property.value.expanded.to.empty.value", linenum, value);