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

Incorrect indentation of LineNumberTable/LocalVariableTable/Exception table/LocalVariableTypeTable/StackMapTable/RuntimeVisibleTypeAnnotations in verbose mode

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P5 P5
    • 24
    • 9
    • tools
    • 9, dev repo

    • b26

      Get the javap's output for any class (e.g.
      public class A {
          public void a() {
          }
      })
      for "-verbose" option.

      LineNumberTable/LocalVariableTable are indented right relatively to the code section.
      ...........
        public a.A();
          descriptor: ()V
          flags: ACC_PUBLIC
          Code:
            stack=1, locals=1, args_size=1
               0: aload_0
               1: invokespecial #1 // Method java/lang/Object."<init>":()V
               4: return
            LineNumberTable:
              line 9: 0
            LocalVariableTable:
              Start Length Slot Name Signature
                  0 5 0 this La/A;
      ...........

      At the same time for "-c -l" option combination the output looks correct:
      ...............
      public class a.A {
        public a.A();
          Code:
             0: aload_0
             1: invokespecial #1 // Method java/lang/Object."<init>":()V
             4: return
          LineNumberTable:
            line 9: 0
          LocalVariableTable:
            Start Length Slot Name Signature
                0 5 0 this La/A;
      ...............

            jlamperth Jonathan Lampérth
            ogb Oleg Barbashov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: