changeset 2286:897d7844b645

Exception parameter index is a short, not a byte.
author wmdietl
date Sun, 03 Mar 2013 10:50:09 -0800
parents 3508f941a8d2
children 21f99e805ed9
files src/share/classes/com/sun/tools/classfile/ClassWriter.java src/share/classes/com/sun/tools/classfile/TypeAnnotation.java src/share/classes/com/sun/tools/javac/jvm/ClassReader.java src/share/classes/com/sun/tools/javac/jvm/ClassWriter.java
diffstat 4 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/classfile/ClassWriter.java	Sat Mar 02 20:30:28 2013 -0800
+++ b/src/share/classes/com/sun/tools/classfile/ClassWriter.java	Sun Mar 03 10:50:09 2013 -0800
@@ -751,7 +751,7 @@
                 break;
             // exception parameter
             case EXCEPTION_PARAMETER:
-                out.writeByte(p.exception_index);
+                out.writeShort(p.exception_index);
                 break;
             // method receiver
             case METHOD_RECEIVER:
--- a/src/share/classes/com/sun/tools/classfile/TypeAnnotation.java	Sat Mar 02 20:30:28 2013 -0800
+++ b/src/share/classes/com/sun/tools/classfile/TypeAnnotation.java	Sun Mar 03 10:50:09 2013 -0800
@@ -111,7 +111,7 @@
             break;
         // exception parameter
         case EXCEPTION_PARAMETER:
-            position.exception_index = cr.readUnsignedByte();
+            position.exception_index = cr.readUnsignedShort();
             break;
         // method receiver
         case METHOD_RECEIVER:
@@ -198,7 +198,7 @@
             break;
         // exception parameter
         case EXCEPTION_PARAMETER:
-            n += 1; // exception_index
+            n += 2; // exception_index
             break;
         // method receiver
         case METHOD_RECEIVER:
--- a/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Sat Mar 02 20:30:28 2013 -0800
+++ b/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Sun Mar 03 10:50:09 2013 -0800
@@ -1518,7 +1518,7 @@
             break;
         // exception parameter
         case EXCEPTION_PARAMETER:
-            position.exception_index = nextByte();
+            position.exception_index = nextChar();
             break;
         // method receiver
         case METHOD_RECEIVER:
--- a/src/share/classes/com/sun/tools/javac/jvm/ClassWriter.java	Sat Mar 02 20:30:28 2013 -0800
+++ b/src/share/classes/com/sun/tools/javac/jvm/ClassWriter.java	Sun Mar 03 10:50:09 2013 -0800
@@ -939,7 +939,7 @@
             break;
         // exception parameter
         case EXCEPTION_PARAMETER:
-            databuf.appendByte(p.exception_index);
+            databuf.appendChar(p.exception_index);
             break;
         // method receiver
         case METHOD_RECEIVER: