JDK-8218287 : jshell tool: input behavior unstable after 12-ea+24 on Windows
  • Type: Bug
  • Component: tools
  • Sub-Component: jshell
  • Affected Version: 12
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-02-04
  • Updated: 2021-07-28
  • Resolved: 2019-02-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 12 JDK 13
11.0.10Fixed 12.0.2Fixed 13 b09Fixed
Related Reports
Duplicate :  
Description
I have tried JShell on Windows 10.
It works expectedly on JDK 11 and <=12-ea+23.
But >=12-ea+24, some inputs are lacked especially when paste.
e.g. If "import java.time.format.*" pastes to JShell, sometimes It could be
below.
-> mport java.time.format.*
-> iport java.time.format.*
-> iort java.time.format.*

And, if I input Japanese characters like kanji, they are garbled.
e.g. "var kanjiFormat = DateTimeFormatter.ofPattern("GGGGy���M���d���",
Locale.JAPAN)"
-> var kanjiFormat = DateTimeFormatter.ofPattern("GGGGy���NM������d���",
Locale.JAPAN)

e.g. "System.out.println("������")"
-> System.out.println("������������")
���?������

I think this unstable behavior comes from the JLine library.

Comments
Thank you for your support, Christoph!
12-11-2020

Hi [~tnakamura], I'll sponsor this for you.
12-11-2020

Fix Request This problem was introduced in 11.0.9, and I'd like to backport this patch to 11 too. This problem is critical for East Asian users. Patch applies cleanly to 11u. tier1 and tier2 tests pass with the patch. (I'm not a committer of update. I'd like to ask a sponsor to push it if it's approved.)
10-11-2020

Fix Request This is important to fix (for an JDK 12 update) because the JShell interactive behavior is broken on Windows, loosing keystrokes from time to time. The fix applies cleanly to JDK 12. There are currently no known reports of problems of misbehavior with this patch, and it is reported the patch works. Original review thread: http://mail.openjdk.java.net/pipermail/kulla-dev/2019-February/002370.html Response about the fix: http://mail.openjdk.java.net/pipermail/kulla-dev/2019-February/002377.html
18-03-2019

Review thread: http://mail.openjdk.java.net/pipermail/kulla-dev/2019-February/002370.html
14-02-2019