Skip to content

Commit

Permalink
Fix NPE in FileTestRunner
Browse files Browse the repository at this point in the history
  • Loading branch information
jhannes committed Sep 3, 2017
1 parent 8b1c8e0 commit 8360ec9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/test/java/org/eaxy/FileTestRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,12 @@ private static List<Runner> runners(Class<?> testClass) throws InitializationErr
}
for (String value : directoryAnnotation.value()) {
File directory = new File(value);
if (!directory.isDirectory() && directoryAnnotation.value().length <= 1) {
throw new InitializationError(directory + " must be a directory");
if (!directory.isDirectory()) {
if (directoryAnnotation.value().length <= 1) {
throw new InitializationError(directory + " must be a directory");
} else {
continue;
}
}
for (File file : directory.listFiles()) {
if (file.isFile() && file.getName().endsWith(directoryAnnotation.extension())) {
Expand Down

0 comments on commit 8360ec9

Please sign in to comment.