JDK-8032814 : LineNumberTable/LocalVariableTable tables duplication for the "-v -l" combination of options
  • Type: Bug
  • Component: tools
  • Sub-Component: javap
  • Affected Version: 8
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2014-01-27
  • Updated: 2014-07-30
  • Resolved: 2014-01-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u20Fixed 9 b03Fixed
Description
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;
}

Comments
Fixed, thanks.
27-01-2014

Is it a typo that in the summary and description (2 places) you use Redund(a)nt when you mean LocalVariableTable?
27-01-2014

Uugh. Good catch.
27-01-2014