Skip to content

Commit 351f42f

Browse files
author
James Leigh
authored
Merge pull request #865 from jamesrdf/issues/#864-console-eof
Fix #864: Check for null input on console
2 parents a9a9c55 + 1e2c7c5 commit 351f42f

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)