Fwd: JShell bug

David Alayachew davidalayachew at gmail.com
Mon Jul 15 02:57:26 UTC 2024


Hello Kulla Dev Team,

I am forwarding the below email to match the correct mailing list.



---------- Forwarded message ---------
From: David Alayachew <davidalayachew at gmail.com>
Date: Sun, Jul 14, 2024 at 3:17 PM
Subject: JShell bug
To: <discuss at openjdk.org>


Terribly sorry to post this on discuss, but I could not find which mailing
list supports JShell.

Attached to this email is text that I had in my clipboard.

I started a fresh JShell session, then pasted the text into JShell. It
immediately threw the attached stacktrace -- an AssertionError.

Here is some relevant info.

david at David2 MINGW64 ~/_WORKSPACE/_PROGRAMMING/_JAVA (main)
$ jshell --version
jshell 23-ea

david at David2 MINGW64 ~/_WORKSPACE/_PROGRAMMING/_JAVA (main)
$ java --version
openjdk 23-ea 2024-09-17
OpenJDK Runtime Environment (build 23-ea+31-2337)
OpenJDK 64-Bit Server VM (build 23-ea+31-2337, mixed mode, sharing)

Also, it seems like the closing curly brace on the switch expression is the
real problem. I pasted everything up to and including the default line in
one shot, then I pasted the trailing empty line, then I pasted the curly
brace, and then jshell crashed with the same error.


If I remove all empty newlines and minify the closing curly brace, it seems
like JShell is happy. Just adding further detail in case it speeds up
anything.


Could someone please forward this email and its attachments to the correct
mailing list?

Thank you for your time and help!
David Alayachew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/kulla-dev/attachments/20240714/bb487679/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: the stacktrace that came out
Type: application/octet-stream
Size: 3247 bytes
Desc: not available
URL: <https://mail.openjdk.org/pipermail/kulla-dev/attachments/20240714/bb487679/thestacktracethatcameout.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: text that I copy-pasted
Type: application/octet-stream
Size: 854 bytes
Desc: not available
URL: <https://mail.openjdk.org/pipermail/kulla-dev/attachments/20240714/bb487679/textthatIcopy-pasted.obj>


More information about the kulla-dev mailing list