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

Newline in object field values list of ScopeDesc should be removed

XMLWordPrintable

    • b15

      public class Test {

          static class MyClass {
              Object o1 = null;
              Object o2 = new Integer(42);
          }

          static Object test(boolean trap) {
              MyClass obj = new MyClass();
              if (trap) { }
              return obj.o1;
          }

          public static void main(String[] args) {
              for (int i = 0; i < 100_000; ++i) {
                  test(false);
              }
          }
      }

      The ScopeDesc for the uncommon trap in 'test' is printed like this:

      ScopeDesc(pc=0x00007f52a5160144 offset=84):
         Test::test@9 (line 11) reexecute=true
         Locals
          - l0: empty
          - l1: obj[52]
         Expression stack
          - @0: reg rbp [10],int
         Objects
          - 52: Test$MyClass NULL
      , stack[0],oop

      There should be no newline after "NULL".

            thartmann Tobias Hartmann
            thartmann Tobias Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: