You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In jline2 (jline-2.1.2.jar), the ConsoleReader discards the line content which has been read and returns null when the line reaches the end of the stream. See snippet of code in
class jline.console.ConsoleReader.java method:
public String readLine(String prompt, final Character mask) throws IOException:
int c = pushBackChar.isEmpty() ? readCharacter() : pushBackChar.pop ();
if (c == -1) {
return null;
}
and readCharacter():
public final int readCharacter() throws IOException {
int c = reader.read();
if (c >= 0) {
Log.trace("Keystroke: ", c);
// clear any echo characters
if (terminal.isSupported()) {
clearEcho(c);
}
}
return c;
}
When EOF is reached in this line, the getCharacter() returns -1 and readLine returns null.
The text was updated successfully, but these errors were encountered:
In jline2 (jline-2.1.2.jar), the ConsoleReader discards the line content which has been read and returns null when the line reaches the end of the stream. See snippet of code in
class jline.console.ConsoleReader.java method:
public String readLine(String prompt, final Character mask) throws IOException:
and readCharacter():
When EOF is reached in this line, the getCharacter() returns -1 and readLine returns null.
The text was updated successfully, but these errors were encountered: