changeset 338:85b317ac8a0c

6734068: Some variable length attributes set their size incorrectly. Reviewed-by: mcimadamore
author jjg
date Tue, 28 Jul 2009 11:00:05 -0700
parents 777a3efad0d5
children c2dfab9e2f39
files src/share/classes/com/sun/tools/classfile/CharacterRangeTable_attribute.java src/share/classes/com/sun/tools/classfile/LineNumberTable_attribute.java src/share/classes/com/sun/tools/classfile/LocalVariableTable_attribute.java src/share/classes/com/sun/tools/classfile/LocalVariableTypeTable_attribute.java src/share/classes/com/sun/tools/classfile/ModuleExportTable_attribute.java src/share/classes/com/sun/tools/classfile/ModuleMemberTable_attribute.java
diffstat 6 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/classfile/CharacterRangeTable_attribute.java	Tue Jul 28 10:36:25 2009 -0700
+++ b/src/share/classes/com/sun/tools/classfile/CharacterRangeTable_attribute.java	Tue Jul 28 11:00:05 2009 -0700
@@ -58,7 +58,7 @@
     }
 
     public CharacterRangeTable_attribute(int name_index, Entry[] character_range_table) {
-        super(name_index, character_range_table.length * Entry.length());
+        super(name_index, 2 + character_range_table.length * Entry.length());
         this.character_range_table = character_range_table;
     }
 
--- a/src/share/classes/com/sun/tools/classfile/LineNumberTable_attribute.java	Tue Jul 28 10:36:25 2009 -0700
+++ b/src/share/classes/com/sun/tools/classfile/LineNumberTable_attribute.java	Tue Jul 28 11:00:05 2009 -0700
@@ -50,7 +50,7 @@
     }
 
     public LineNumberTable_attribute(int name_index, Entry[] line_number_table) {
-        super(name_index, line_number_table.length * Entry.length());
+        super(name_index, 2 + line_number_table.length * Entry.length());
         this.line_number_table_length = line_number_table.length;
         this.line_number_table = line_number_table;
     }
--- a/src/share/classes/com/sun/tools/classfile/LocalVariableTable_attribute.java	Tue Jul 28 10:36:25 2009 -0700
+++ b/src/share/classes/com/sun/tools/classfile/LocalVariableTable_attribute.java	Tue Jul 28 11:00:05 2009 -0700
@@ -50,7 +50,7 @@
     }
 
     public LocalVariableTable_attribute(int name_index, Entry[] local_variable_table) {
-        super(name_index, local_variable_table.length * Entry.length());
+        super(name_index, 2 + local_variable_table.length * Entry.length());
         this.local_variable_table_length = local_variable_table.length;
         this.local_variable_table = local_variable_table;
     }
--- a/src/share/classes/com/sun/tools/classfile/LocalVariableTypeTable_attribute.java	Tue Jul 28 10:36:25 2009 -0700
+++ b/src/share/classes/com/sun/tools/classfile/LocalVariableTypeTable_attribute.java	Tue Jul 28 11:00:05 2009 -0700
@@ -50,7 +50,7 @@
     }
 
     public LocalVariableTypeTable_attribute(int name_index, Entry[] local_variable_table) {
-        super(name_index, local_variable_table.length * Entry.length());
+        super(name_index, 2 + local_variable_table.length * Entry.length());
         this.local_variable_table_length = local_variable_table.length;
         this.local_variable_table = local_variable_table;
     }
--- a/src/share/classes/com/sun/tools/classfile/ModuleExportTable_attribute.java	Tue Jul 28 10:36:25 2009 -0700
+++ b/src/share/classes/com/sun/tools/classfile/ModuleExportTable_attribute.java	Tue Jul 28 11:00:05 2009 -0700
@@ -50,7 +50,7 @@
     }
 
     public ModuleExportTable_attribute(int name_index, int[] export_type_table) {
-        super(name_index, 2 * export_type_table.length);
+        super(name_index, 2 + 2 * export_type_table.length);
         this.export_type_table = export_type_table;
     }
 
--- a/src/share/classes/com/sun/tools/classfile/ModuleMemberTable_attribute.java	Tue Jul 28 10:36:25 2009 -0700
+++ b/src/share/classes/com/sun/tools/classfile/ModuleMemberTable_attribute.java	Tue Jul 28 11:00:05 2009 -0700
@@ -49,7 +49,7 @@
     }
 
     public ModuleMemberTable_attribute(int name_index, int[] package_member_table) {
-        super(name_index, 2 * package_member_table.length);
+        super(name_index, 2 + 2 * package_member_table.length);
         this.package_member_table = package_member_table;
     }