Switch on null string error message
Charles Chang
im741314 at gmail.com
Fri Mar 7 06:00:36 UTC 2025
Hi All
Given this case, which basically switch on null,

Exception in thread "main" java.lang.NullPointerException: Cannot invoke "String.hashCode()" because "<local2>" is null
at Main.main(Main.java:11)
The error message isn’t very good. Just giving a feedback.
Best
Charles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20250307/948baff9/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PastedGraphic-2.tiff
Type: image/tiff
Size: 57850 bytes
Desc: not available
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20250307/948baff9/PastedGraphic-2-0001.tiff>
More information about the amber-dev
mailing list