< prev index next >

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

Print this page
rev 52979 : 8215281: Use String.isEmpty() when applicable in java.base
Reviewed-by: TBD

*** 624,634 **** // correct one. try { return url.openStream(); } catch (Exception e) { String file = url.getPath(); ! if (url.getHost().length() > 0) { // For Windows UNC file = "//" + url.getHost() + file; } if (debugConfig != null) { debugConfig.println("cannot read " + url + ", try " + file); --- 624,634 ---- // correct one. try { return url.openStream(); } catch (Exception e) { String file = url.getPath(); ! if (!url.getHost().isEmpty()) { // For Windows UNC file = "//" + url.getHost() + file; } if (debugConfig != null) { debugConfig.println("cannot read " + url + ", try " + file);
*** 649,659 **** if (!expandProp) { return value; } String s = PropertyExpander.expand(value); ! if (s == null || s.length() == 0) { throw ioException( "Configuration.Error.Line.line.system.property.value.expanded.to.empty.value", linenum, value); } return s; --- 649,659 ---- if (!expandProp) { return value; } String s = PropertyExpander.expand(value); ! if (s == null || s.isEmpty()) { throw ioException( "Configuration.Error.Line.line.system.property.value.expanded.to.empty.value", linenum, value); } return s;
< prev index next >