< prev index next >
src/java.base/share/classes/sun/net/www/protocol/jar/URLJarFile.java
Print this page
rev 52881 : 8214971: Replace use of string.equals("") with isEmpty()
*** 109,119 ****
/*
* Consider this a 'file' only if it's a LOCAL file, because
* 'file:' URLs can be accessible through ftp.
*/
String host = url.getHost();
! if (host == null || host.equals("") || host.equals("~") ||
host.equalsIgnoreCase("localhost"))
return true;
}
return false;
}
--- 109,119 ----
/*
* Consider this a 'file' only if it's a LOCAL file, because
* 'file:' URLs can be accessible through ftp.
*/
String host = url.getHost();
! if (host == null || host.isEmpty() || host.equals("~") ||
host.equalsIgnoreCase("localhost"))
return true;
}
return false;
}
< prev index next >