< prev index next >
src/java.base/windows/classes/jdk/internal/loader/FileURLMapper.java
Print this page
rev 52881 : 8214971: Replace use of string.equals("") with isEmpty()
Reviewed-by: jlaskey, prappo, lancea, dfuchs, redestad
*** 53,63 ****
public String getPath () {
if (file != null) {
return file;
}
String host = url.getHost();
! if (host != null && !host.equals("") &&
!"localhost".equalsIgnoreCase(host)) {
String rest = url.getFile();
String s = host + ParseUtil.decode (url.getFile());
file = "\\\\"+ s.replace('/', '\\');
return file;
--- 53,63 ----
public String getPath () {
if (file != null) {
return file;
}
String host = url.getHost();
! if (host != null && !host.isEmpty() &&
!"localhost".equalsIgnoreCase(host)) {
String rest = url.getFile();
String s = host + ParseUtil.decode (url.getFile());
file = "\\\\"+ s.replace('/', '\\');
return file;
< prev index next >