src/share/vm/classfile/classFileParser.cpp

changeset 6762
5f7e12f5b4e5
parent 6593
9b289963cb9a
child 6765
f0d759a6a230
equal deleted inserted replaced
6761:aff11567504c 6762:5f7e12f5b4e5
2768 2768
2769 void ClassFileParser::parse_classfile_bootstrap_methods_attribute(u4 attribute_byte_length, TRAPS) { 2769 void ClassFileParser::parse_classfile_bootstrap_methods_attribute(u4 attribute_byte_length, TRAPS) {
2770 ClassFileStream* cfs = stream(); 2770 ClassFileStream* cfs = stream();
2771 u1* current_start = cfs->current(); 2771 u1* current_start = cfs->current();
2772 2772
2773 cfs->guarantee_more(2, CHECK); // length
2774 int attribute_array_length = cfs->get_u2_fast();
2775
2776 guarantee_property(_max_bootstrap_specifier_index < attribute_array_length,
2777 "Short length on BootstrapMethods in class file %s",
2778 CHECK);
2779
2780 guarantee_property(attribute_byte_length > sizeof(u2), 2773 guarantee_property(attribute_byte_length > sizeof(u2),
2781 "Invalid BootstrapMethods attribute length %u in class file %s", 2774 "Invalid BootstrapMethods attribute length %u in class file %s",
2782 attribute_byte_length, 2775 attribute_byte_length,
2776 CHECK);
2777
2778 cfs->guarantee_more(attribute_byte_length, CHECK);
2779
2780 int attribute_array_length = cfs->get_u2_fast();
2781
2782 guarantee_property(_max_bootstrap_specifier_index < attribute_array_length,
2783 "Short length on BootstrapMethods in class file %s",
2783 CHECK); 2784 CHECK);
2784 2785
2785 // The attribute contains a counted array of counted tuples of shorts, 2786 // The attribute contains a counted array of counted tuples of shorts,
2786 // represending bootstrap specifiers: 2787 // represending bootstrap specifiers:
2787 // length*{bootstrap_method_index, argument_count*{argument_index}} 2788 // length*{bootstrap_method_index, argument_count*{argument_index}}

mercurial