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

LineNumberTable/LocalVariableTable tables duplication for the "-v -l" combination of options

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 8
    • tools
    • 8.0 b126

    • b03
    • Verified

        Compile any class e.g.
        public class SimpleClass {
            public void m() {
            }
        }
        and get javap's output for the "-v -l" combination of options.
        The LineNumberTable/LocalVariableTable tables are duplicated: the first occurrence immediately after the class/method declaration and the second is at the end of "Code" section:

        ....
        {
          public SimpleClass();
            descriptor: ()V
            flags: ACC_PUBLIC
            LineNumberTable:
              line 9: 0
            LocalVariableTable:
              Start Length Slot Name Signature
                  0 5 0 this LSimpleClass;
            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 LSimpleClass;

          public void m();
            descriptor: ()V
            flags: ACC_PUBLIC
            LineNumberTable:
              line 11: 0
            LocalVariableTable:
              Start Length Slot Name Signature
                  0 1 0 this LSimpleClass;
            Code:
              stack=0, locals=1, args_size=1
                 0: return
              LineNumberTable:
                line 11: 0
              LocalVariableTable:
                Start Length Slot Name Signature
                    0 1 0 this LSimpleClass;
        }

              jjg Jonathan Gibbons
              ogb Oleg Barbashov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: