Skip to content

Commit 7aa4f73

Browse files
author
Gary Gregory
committed
Use isEmpty().
1 parent 62dc183 commit 7aa4f73

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/org/apache/commons/io/FileSystemUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ long freeSpaceWindows(final String path, final long timeout) throws IOException
304304
if (normPath == null) {
305305
throw new IllegalArgumentException(path);
306306
}
307-
if (normPath.length() > 0 && normPath.charAt(0) != '"') {
307+
if (!normPath.isEmpty() && normPath.charAt(0) != '"') {
308308
normPath = "\"" + normPath + "\"";
309309
}
310310

@@ -320,7 +320,7 @@ long freeSpaceWindows(final String path, final long timeout) throws IOException
320320
// not, still assuming it is on the last non-blank line)
321321
for (int i = lines.size() - 1; i >= 0; i--) {
322322
final String line = lines.get(i);
323-
if (line.length() > 0) {
323+
if (!line.isEmpty()) {
324324
return parseDir(line, normPath);
325325
}
326326
}

0 commit comments

Comments
 (0)