--- a/jdk/src/java.base/share/classes/jdk/internal/org/objectweb/asm/MethodWriter.java Tue Mar 15 12:38:35 2016 +0800
+++ b/jdk/src/java.base/share/classes/jdk/internal/org/objectweb/asm/MethodWriter.java Tue Mar 01 12:33:04 2016 -0800
@@ -2061,7 +2061,7 @@
}
int size = 8;
if (code.length > 0) {
- if (code.length > 65536) {
+ if (code.length > 65535) {
throw new RuntimeException("Method code too large!");
}
cw.newUTF8("Code");
@@ -2735,11 +2735,13 @@
l = l.successor;
}
// Update the offsets in the uninitialized types
- for (i = 0; i < cw.typeTable.length; ++i) {
- Item item = cw.typeTable[i];
- if (item != null && item.type == ClassWriter.TYPE_UNINIT) {
- item.intVal = getNewOffset(allIndexes, allSizes, 0,
- item.intVal);
+ if (cw.typeTable != null) {
+ for (i = 0; i < cw.typeTable.length; ++i) {
+ Item item = cw.typeTable[i];
+ if (item != null && item.type == ClassWriter.TYPE_UNINIT) {
+ item.intVal = getNewOffset(allIndexes, allSizes, 0,
+ item.intVal);
+ }
}
}
// The stack map frames are not serialized yet, so we don't need