8006948: Update javac for MethodParameters format change
authorksrini
Tue, 19 Feb 2013 17:19:01 -0800
changeset 16305 ee7f13d9d434
parent 16304 475504933a2d
child 16306 da9b3b678b1a
8006948: Update javac for MethodParameters format change Reviewed-by: ksrini, forax Contributed-by: eric.mccorkle@oracle.com
langtools/src/share/classes/com/sun/tools/classfile/ClassWriter.java
langtools/src/share/classes/com/sun/tools/classfile/MethodParameters_attribute.java
langtools/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java
langtools/src/share/classes/com/sun/tools/javac/jvm/ClassWriter.java
--- a/langtools/src/share/classes/com/sun/tools/classfile/ClassWriter.java	Tue Feb 19 17:53:16 2013 +0000
+++ b/langtools/src/share/classes/com/sun/tools/classfile/ClassWriter.java	Tue Feb 19 17:19:01 2013 -0800
@@ -483,7 +483,7 @@
             out.writeByte(attr.method_parameter_table.length);
             for (MethodParameters_attribute.Entry e : attr.method_parameter_table) {
                 out.writeShort(e.name_index);
-                out.writeInt(e.flags);
+                out.writeShort(e.flags);
             }
             return null;
         }
--- a/langtools/src/share/classes/com/sun/tools/classfile/MethodParameters_attribute.java	Tue Feb 19 17:53:16 2013 +0000
+++ b/langtools/src/share/classes/com/sun/tools/classfile/MethodParameters_attribute.java	Tue Feb 19 17:19:01 2013 -0800
@@ -73,7 +73,7 @@
     public static class Entry {
         Entry(ClassReader cr) throws IOException {
             name_index = cr.readUnsignedShort();
-            flags = cr.readInt();
+            flags = cr.readUnsignedShort();
         }
 
         public static int length() {
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Tue Feb 19 17:53:16 2013 +0000
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Tue Feb 19 17:19:01 2013 -0800
@@ -1036,7 +1036,7 @@
                         haveParameterNameIndices = true;
                         for (int i = 0; i < numEntries; i++) {
                             int nameIndex = nextChar();
-                            int flags = nextInt();
+                            int flags = nextChar();
                             parameterNameIndices[i] = nameIndex;
                         }
                     }
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassWriter.java	Tue Feb 19 17:53:16 2013 +0000
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassWriter.java	Tue Feb 19 17:19:01 2013 -0800
@@ -659,7 +659,7 @@
                     ((int) s.flags() & (FINAL | SYNTHETIC | MANDATED)) |
                     ((int) m.flags() & SYNTHETIC);
                 databuf.appendChar(pool.put(s.name));
-                databuf.appendInt(flags);
+                databuf.appendChar(flags);
             }
             endAttr(attrIndex);
             return 1;