Skip to content
Permalink
Browse files
1040: Crash in webrev command
Reviewed-by: kcr
  • Loading branch information
erikj79 committed Jul 16, 2021
1 parent be4ddfd commit db61a394d4b579f1c32561e2c8e0dbd82a1d13cc
Showing with 4 additions and 1 deletion.
  1. +4 −1 cli/src/main/java/org/openjdk/skara/cli/GitWebrev.java
@@ -397,8 +397,11 @@ private static void generate(String[] args) throws IOException {
if (path.equals(Path.of("-"))) {
var reader = new BufferedReader(new InputStreamReader(System.in));
files = reader.lines().map(Path::of).collect(Collectors.toList());
} else {
} else if (Files.exists(path) && !Files.isDirectory(path) && Files.isReadable(path)) {
files = Files.readAllLines(path).stream().map(Path::of).collect(Collectors.toList());
} else {
System.err.println(String.format("error: '%s' is not a readable file", path));
System.exit(1);
}
}

1 comment on commit db61a39

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on db61a39 Jul 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.