Integrated: 8358552: EndOfFileException in System.in.read() and IO.readln() etc. in JShell
Christian Stein
cstein at openjdk.org
Mon Jul 7 09:02:44 UTC 2025
On Tue, 10 Jun 2025 08:29:15 GMT, Christian Stein <cstein at openjdk.org> wrote:
> Please review this change to handle an `EndOfFileException` while reading input from a user console in such a way, that no stacktrace is emitted. The handling of the `Ctrl+D` command is left as-is; here the following underlying core-libs should stay in control:
>
> - `System.in.read()`
> - `System.console().reader().read()`
> - `System.console().readLine()`
> - `System.console().readPassword()`
> - `System.in.readAllBytes()`
> - `IO.readln()`
This pull request has now been integrated.
Changeset: 9449fea2
Author: Christian Stein <cstein at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/9449fea2cd7aa7375f1b127e5f0d2a36ffaa1814
Stats: 96 lines in 6 files changed: 64 ins; 5 del; 27 mod
8358552: EndOfFileException in System.in.read() and IO.readln() etc. in JShell
Reviewed-by: jlahoda
-------------
PR: https://git.openjdk.org/jdk/pull/25713
More information about the kulla-dev
mailing list