6734068: Some variable length attributes set their size incorrectly

Reviewed-by: mcimadamore
This commit is contained in:
Jonathan Gibbons 2009-07-28 11:00:05 -07:00
parent 2655dbfaac
commit 66637352ac
6 changed files with 6 additions and 6 deletions

View File

@ -58,7 +58,7 @@ public class CharacterRangeTable_attribute extends Attribute {
}
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;
}

View File

@ -50,7 +50,7 @@ public class LineNumberTable_attribute extends Attribute {
}
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;
}

View File

@ -50,7 +50,7 @@ public class LocalVariableTable_attribute extends Attribute {
}
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;
}

View File

@ -50,7 +50,7 @@ public class LocalVariableTypeTable_attribute extends Attribute {
}
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;
}

View File

@ -50,7 +50,7 @@ public class ModuleExportTable_attribute extends Attribute {
}
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;
}

View File

@ -49,7 +49,7 @@ public class ModuleMemberTable_attribute extends Attribute {
}
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;
}