RFR: 8358552: EndOfFileException in System.in.read() and IO.readln() etc. in JShell
Christian Stein
cstein at openjdk.org
Mon Jun 30 07:31:51 UTC 2025
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()`
-------------
Commit messages:
- 8358552: EndOfFileException in System.in.read() and IO.readln() etc. in JShell
Changes: https://git.openjdk.org/jdk/pull/25713/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25713&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8358552
Stats: 34 lines in 3 files changed: 32 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/25713.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/25713/head:pull/25713
PR: https://git.openjdk.org/jdk/pull/25713
More information about the kulla-dev
mailing list