-
Bug
-
Resolution: Fixed
-
P3
-
26
ADDITIONAL SYSTEM INFORMATION :
openjdk 26-ea 2026-03-17
OpenJDK Runtime Environment (build 26-ea+6-582)
OpenJDK 64-Bit Server VM (build 26-ea+6-582, mixed mode, sharing)
Windows 24H2
A DESCRIPTION OF THE PROBLEM :
This is a regression caused by the fact that the fix (https://github.com/openjdk/jdk/pull/25713 / https://github.com/openjdk/jdk/commit/9449fea2cd7aa7375f1b127e5f0d2a36ffaa1814) forJDK-8358552 is not sufficient. I personally tried to fix that bug by myself but gave up due to *this* regression.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. jdk-26/bin/jshell
2. jshell> IO.readln() or jshell> System.in.read()
3. Press Ctrl + D
4. Run 2. once again
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
JShell pauses for additional input like when 2.
ACTUAL -
JShell won't accept input and returns the same result as 3.
The fact that the empty lines between the commands and the results in $2 or later lack shows that JShell didn't pause there.
===== IO.readln() =====
jshell> IO.readln()
$1 ==> null
jshell> IO.readln()
$2 ==> null
jshell> IO.readln()
$3 ==> null
===== System.in.read() =====
jshell> System.in.read()
$1 ==> -1
jshell> System.in.read()
$2 ==> -1
jshell> System.in.read()
$3 ==> -1
jshell> System.in.read()
$4 ==> -1
---------- BEGIN SOURCE ----------
// JShell only
---------- END SOURCE ----------
openjdk 26-ea 2026-03-17
OpenJDK Runtime Environment (build 26-ea+6-582)
OpenJDK 64-Bit Server VM (build 26-ea+6-582, mixed mode, sharing)
Windows 24H2
A DESCRIPTION OF THE PROBLEM :
This is a regression caused by the fact that the fix (https://github.com/openjdk/jdk/pull/25713 / https://github.com/openjdk/jdk/commit/9449fea2cd7aa7375f1b127e5f0d2a36ffaa1814) for
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. jdk-26/bin/jshell
2. jshell> IO.readln() or jshell> System.in.read()
3. Press Ctrl + D
4. Run 2. once again
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
JShell pauses for additional input like when 2.
ACTUAL -
JShell won't accept input and returns the same result as 3.
The fact that the empty lines between the commands and the results in $2 or later lack shows that JShell didn't pause there.
===== IO.readln() =====
jshell> IO.readln()
$1 ==> null
jshell> IO.readln()
$2 ==> null
jshell> IO.readln()
$3 ==> null
===== System.in.read() =====
jshell> System.in.read()
$1 ==> -1
jshell> System.in.read()
$2 ==> -1
jshell> System.in.read()
$3 ==> -1
jshell> System.in.read()
$4 ==> -1
---------- BEGIN SOURCE ----------
// JShell only
---------- END SOURCE ----------
- caused by
-
JDK-8358552 EndOfFileException in System.in.read() and IO.readln() etc. in JShell
-
- Resolved
-
- links to
-
Commit(master) openjdk/jdk/40d159d4
-
Review(master) openjdk/jdk/26292