JDK-6271292 : javap should print StackMapTable in a more readable format
  • Type: Enhancement
  • Component: tools
  • Sub-Component: javap
  • Affected Version: 6
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2005-05-16
  • Updated: 2017-05-16
  • Resolved: 2005-11-12
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 6
6 b61Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
When version 50 classes are read, javap should print StackMapTable attribute contents in a more readable format.

===============================
Test.java:
class Test {
  void runIt(int i) {
    if (i==0) { zeroTest(); }
  }
  void zeroTest() { }
}
    
> javac -target 6 Test.java
> javap -verbose Test | more
Compiled from "Test.java"
class Test extends java.lang.Object
  SourceFile: "Test.java"
  minor version: 0
  major version: 50
  Constant pool:
const #1 = Method	#4.#15;	//  java/lang/Object."<init>":()V
const #2 = Method	#3.#16;	//  Test.zeroTest:()V
const #3 = class	#17;	//  Test
const #4 = class	#18;	//  java/lang/Object
const #5 = Asciz	<init>;
const #6 = Asciz	()V;
const #7 = Asciz	Code;
const #8 = Asciz	LineNumberTable;
const #9 = Asciz	runIt;
const #10 = Asciz	(I)V;
const #11 = Asciz	StackMapTable;
const #12 = Asciz	zeroTest;
const #13 = Asciz	SourceFile;
const #14 = Asciz	Test.java;
const #15 = NameAndType	#5:#6;//  "<init>":()V
const #16 = NameAndType	#12:#6;//  zeroTest:()V
const #17 = Asciz	Test;
const #18 = Asciz	java/lang/Object;

{
Test();
  Code:
   Stack=1, Locals=1, Args_size=1
   0:	aload_0
   1:	invokespecial	#1; //Method java/lang/Object."<init>":()V
   4:	return
  LineNumberTable: 
   line 1: 0

void runIt(int);
  Code:
   Stack=1, Locals=2, Args_size=2
   0:	iload_1
   1:	ifne	8
   4:	aload_0
   5:	invokevirtual	#2; //Method zeroTest:()V
   8:	return
  LineNumberTable: 
   line 3: 0
   line 4: 8
  StackMapTable: length = 0x3
   00 01 08 

void zeroTest();
  Code:
   Stack=0, Locals=1, Args_size=1
   0:	return
  LineNumberTable: 
   line 6: 0

}

###@###.### 2005-05-16 23:15:24 GMT

Comments
EVALUATION Javap will print out contents of StackMap and StackMapTable in a readable format.
20-10-2005