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

A missing whitespace in jdb message printed when setting an inline type to null

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: repo-valhalla
    • Fix Version/s: repo-valhalla
    • Component/s: core-svc
    • Labels:
      None

      Description

      Compile the sample test.
      2. Start jdb:
      $ jdb -classpath . Test
      3. Set breakpoint on the line with System.out.println()
      > stop at Test:6
      4. Run to breakpoint
      > run
      5. Assign null to variable v
      > set v = null

      The following message is printed :
      ===================
      com.sun.tools.example.debug.expr.ParseException: Attempt to set value of incorrect typecom.sun.jdi.InvalidTypeException: Can't set an inline type to null
       v = null = null
      ==============

      Note that the whitespace is missing between "type" and "com.sun.jdi.InvalidTypeException"

      =====================================================
      public class Test {

          public static void main(String[] args){
              MyValue v = new MyValue(12,'c');
              System.out.println("v == v " + (v == v));
          }

          public inline static class MyValue {
              int a;
              char b;

              public MyValue(int a, char b){
                  this.a = a;
                  this.b = b;
              }

          }
      }

        Attachments

          Activity

            People

            • Assignee:
              dtitov Daniil Titov
              Reporter:
              dtitov Daniil Titov
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: