< prev index next >
src/java.base/unix/classes/jdk/internal/loader/FileURLMapper.java
Print this page
rev 52979 : 8215281: Use String.isEmpty() when applicable in java.base
Reviewed-by: TBD
@@ -57,13 +57,13 @@
public String getPath () {
if (path != null) {
return path;
}
String host = url.getHost();
- if (host == null || "".equals(host) || "localhost".equalsIgnoreCase (host)) {
+ if (host == null || host.isEmpty() || "localhost".equalsIgnoreCase(host)) {
path = url.getFile();
- path = ParseUtil.decode (path);
+ path = ParseUtil.decode(path);
}
return path;
}
/**
< prev index next >