JDK-8325257 : jshell reports NoSuchFieldError with instanceof primitive type
  • Type: Bug
  • Component: tools
  • Sub-Component: jshell
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-02-05
  • Updated: 2024-02-12
  • Resolved: 2024-02-07
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 23
23 b09Fixed
Related Reports
Relates :  
Description
jshell> Object o = 1L
o ==> 1

jshell> o instanceof Long
$2 ==> true

jshell> o instanceof long
|  Exception java.lang.NoSuchFieldError: Class REPL.$JShell$13 does not have member field 'java.lang.Object o'
|        at (#3:1)

jshell> long l = 1L
l ==> 1

jshell> l instanceof Long
$5 ==> true

jshell> l instanceof long
$6 ==> true

Comments
Changeset: e0d98dd3 Author: Aggelos Biboudis <abimpoudis@openjdk.org> Date: 2024-02-07 06:59:48 +0000 URL: https://git.openjdk.org/jdk/commit/e0d98dd3019b2fd6b95dd341296899dc0b470cb1
07-02-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/17729 Date: 2024-02-06 10:50:08 +0000
06-02-2024