Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8325257

jshell reports NoSuchFieldError with instanceof primitive type

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 23
    • None
    • tools
    • None
    • 23
    • b09

    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

      Attachments

        Issue Links

          Activity

            People

              abimpoudis Angelos Bimpoudis
              abimpoudis Angelos Bimpoudis
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: