diff options
author | Decebal Suiu <decebal.suiu@gmail.com> | 2020-04-22 07:02:17 +0300 |
---|---|---|
committer | Decebal Suiu <decebal.suiu@gmail.com> | 2020-04-22 07:02:17 +0300 |
commit | 01e42ee873f5b20c54744f21748fe2d2f28c0744 (patch) | |
tree | 5e5f2778d37066c6f2ef785b57b99fd18fda85cd | |
parent | 205daadc01841af178dd299b20512c894a7b571b (diff) | |
download | pf4j-01e42ee873f5b20c54744f21748fe2d2f28c0744.tar.gz pf4j-01e42ee873f5b20c54744f21748fe2d2f28c0744.zip |
Eliminate some redundant checks
-rw-r--r-- | pf4j/src/main/java/org/pf4j/util/FileUtils.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pf4j/src/main/java/org/pf4j/util/FileUtils.java b/pf4j/src/main/java/org/pf4j/util/FileUtils.java index 092ef3b..2a0ca85 100644 --- a/pf4j/src/main/java/org/pf4j/util/FileUtils.java +++ b/pf4j/src/main/java/org/pf4j/util/FileUtils.java @@ -48,7 +48,7 @@ public class FileUtils { public static List<String> readLines(Path path, boolean ignoreComments) throws IOException { File file = path.toFile(); - if (!file.exists() || !file.isFile()) { + if (!file.isFile()) { return new ArrayList<>(); } @@ -117,7 +117,7 @@ public class FileUtils { FileFilter jarFilter = new JarFileFilter(); FileFilter directoryFilter = new DirectoryFileFilter(); - if (Files.exists(folder) && Files.isDirectory(folder)) { + if (Files.isDirectory(folder)) { File[] jars = folder.toFile().listFiles(jarFilter); for (int i = 0; (jars != null) && (i < jars.length); ++i) { bucket.add(jars[i]); |