-
Bug
-
Resolution: Fixed
-
P3
-
6
-
1.4
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2127038 | 1.3.1 | Jeff Suttor | P3 | Closed | Won't Fix |
The JDK 6.0 will be creating a StackMapTable attribute that is required for verification.
This attribute contains byte code offsets, constant pool index values, and descriptions of the stack contents. The BCEL code re-writes classfiles and will need to process these attributes.
> cat HelloWorld.java
public class HelloWorld {
public static void main(String args[]) {
/* Use a generic type */
java.util.List<String> l = new java.util.ArrayList<String>();
String.format("%s", "");
/* Just some code with branches */
try {
if ( args.length == 0 ) {
System.out.println("No arguments passed in");
} else {
System.out.println("No arguments passed in");
}
} catch ( Throwable e ) {
System.out.println("ERROR: System.out.println() did a throw");
} finally {
System.out.println("Hello, world!");
}
}
}
> /opt/java/jdk1.6.0/bin/javac -target 1.6 -g HelloWorld.java
> /opt/java/jdk1.6.0/bin/javap -verbose HelloWorld | tail -15
line 19: 87
line 20: 89
LocalVariableTable:
Start Length Slot Name Signature
59 8 2 e Ljava/lang/Throwable;
0 90 0 args [Ljava/lang/String;
8 82 1 l Ljava/util/List;
LocalVariableTypeTable: length = 0xC
00 01 00 08 00 52 00 1C 00 1F 00 01
StackMapTable: length = 0x12 <---- StackMap Attribute
00 05 FFFFFFFC 00 27 07 00 21 07 4A 07 00 22 53 07 00
22 0A
}
###@###.### 2005-05-17 17:08:55 GMT
This attribute contains byte code offsets, constant pool index values, and descriptions of the stack contents. The BCEL code re-writes classfiles and will need to process these attributes.
> cat HelloWorld.java
public class HelloWorld {
public static void main(String args[]) {
/* Use a generic type */
java.util.List<String> l = new java.util.ArrayList<String>();
String.format("%s", "");
/* Just some code with branches */
try {
if ( args.length == 0 ) {
System.out.println("No arguments passed in");
} else {
System.out.println("No arguments passed in");
}
} catch ( Throwable e ) {
System.out.println("ERROR: System.out.println() did a throw");
} finally {
System.out.println("Hello, world!");
}
}
}
> /opt/java/jdk1.6.0/bin/javac -target 1.6 -g HelloWorld.java
> /opt/java/jdk1.6.0/bin/javap -verbose HelloWorld | tail -15
line 19: 87
line 20: 89
LocalVariableTable:
Start Length Slot Name Signature
59 8 2 e Ljava/lang/Throwable;
0 90 0 args [Ljava/lang/String;
8 82 1 l Ljava/util/List;
LocalVariableTypeTable: length = 0xC
00 01 00 08 00 52 00 1C 00 1F 00 01
StackMapTable: length = 0x12 <---- StackMap Attribute
00 05 FFFFFFFC 00 27 07 00 21 07 4A 07 00 22 53 07 00
22 0A
}
###@###.### 2005-05-17 17:08:55 GMT
- backported by
-
JDK-2127038 com.sun.org.apache.bcel missing StackMapTable Code Attribute (version 50 classfiles)
-
- Closed
-