< prev index next >

src/java.base/share/classes/sun/net/www/protocol/ftp/FtpURLConnection.java

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

*** 339,349 **** } if (path != null && path.length() > 1 && path.charAt(0) == '/') { path = path.substring(1); } ! if (path == null || path.length() == 0) { path = "./"; } if (!path.endsWith("/")) { i = path.lastIndexOf('/'); if (i > 0) { --- 339,349 ---- } if (path != null && path.length() > 1 && path.charAt(0) == '/') { path = path.substring(1); } ! if (path == null || path.isEmpty()) { path = "./"; } if (!path.endsWith("/")) { i = path.lastIndexOf('/'); if (i > 0) {
*** 553,563 **** if (os != null) { return os; } decodePath(url.getPath()); ! if (filename == null || filename.length() == 0) { throw new IOException("illegal filename for a PUT"); } try { if (pathname != null) { cd(pathname); --- 553,563 ---- if (os != null) { return os; } decodePath(url.getPath()); ! if (filename == null || filename.isEmpty()) { throw new IOException("illegal filename for a PUT"); } try { if (pathname != null) { cd(pathname);
< prev index next >