This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git
The following commit(s) were added to refs/heads/master by this push:
new 7aa4f73 Use isEmpty().
7aa4f73 is described below
commit 7aa4f7338abf63d613d5ab7b5ff1e4bb035f767c
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Jan 17 10:12:45 2021 -0500
Use isEmpty().
---
src/main/java/org/apache/commons/io/FileSystemUtils.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/commons/io/FileSystemUtils.java
b/src/main/java/org/apache/commons/io/FileSystemUtils.java
index 09cfdb5..0043460 100644
--- a/src/main/java/org/apache/commons/io/FileSystemUtils.java
+++ b/src/main/java/org/apache/commons/io/FileSystemUtils.java
@@ -304,7 +304,7 @@ public class FileSystemUtils {
if (normPath == null) {
throw new IllegalArgumentException(path);
}
- if (normPath.length() > 0 && normPath.charAt(0) != '"') {
+ if (!normPath.isEmpty() && normPath.charAt(0) != '"') {
normPath = "\"" + normPath + "\"";
}
@@ -320,7 +320,7 @@ public class FileSystemUtils {
// not, still assuming it is on the last non-blank line)
for (int i = lines.size() - 1; i >= 0; i--) {
final String line = lines.get(i);
- if (line.length() > 0) {
+ if (!line.isEmpty()) {
return parseDir(line, normPath);
}
}