aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDecebal Suiu <decebal.suiu@gmail.com>2020-04-22 07:02:17 +0300
committerDecebal Suiu <decebal.suiu@gmail.com>2020-04-22 07:02:17 +0300
commit01e42ee873f5b20c54744f21748fe2d2f28c0744 (patch)
tree5e5f2778d37066c6f2ef785b57b99fd18fda85cd
parent205daadc01841af178dd299b20512c894a7b571b (diff)
downloadpf4j-01e42ee873f5b20c54744f21748fe2d2f28c0744.tar.gz
pf4j-01e42ee873f5b20c54744f21748fe2d2f28c0744.zip
Eliminate some redundant checks
-rw-r--r--pf4j/src/main/java/org/pf4j/util/FileUtils.java4
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]);