Skip to content

Commit 1e2c7c5

Browse files
author
James Leigh
committed
Fix #864: Check for null input on console
Signed-off-by: James Leigh <james.leigh@ontotext.com>
1 parent d5e7815 commit 1e2c7c5

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

core/console/src/main/java/org/eclipse/rdf4j/console/ConsoleIO.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ protected String readCommand()
5353
}
5454
write("> ");
5555
}
56-
String line = input.readLine().trim();
56+
String line = input.readLine();
57+
if (line == null) {
58+
return null;
59+
}
60+
line = line.trim();
5761
if (line.endsWith(".")) {
5862
line = line.substring(0, line.length() - 1);
5963
}

0 commit comments

Comments
 (0)