Prevent CTRL-D from causing NPE in shell
Update the integrated shell to deal with a null line which can be triggered with CTRL-D. Fixes gh-229
This commit is contained in:
parent
796816e8c3
commit
28a92d22dc
|
|
@ -175,8 +175,8 @@ public class Shell {
|
|||
}
|
||||
|
||||
private void runInputLoop() throws Exception {
|
||||
while (true) {
|
||||
String line = this.consoleReader.readLine(getPrompt());
|
||||
String line;
|
||||
while ((line = this.consoleReader.readLine(getPrompt())) != null) {
|
||||
while (line.endsWith("\\")) {
|
||||
line = line.substring(0, line.length() - 1);
|
||||
line += this.consoleReader.readLine("> ");
|
||||
|
|
|
|||
Loading…
Reference in New Issue