comparison src/share/vm/classfile/classFileParser.cpp @ 17934:366c198c896d

8041918: BootstrapMethods attribute cannot be empty. Summary: Allow a BootstrapMethods attribute that contains an empty bootstrap_methods table where num_bootstrap_methods is equal to zero. Reviewed-by: coleenp, hseigel
author lfoltan
date Thu, 15 May 2014 09:25:27 -0400
parents b6a2ba7d3ea7
children ae92351815b6 f73af4455d7d
comparison
equal deleted inserted replaced
17933:124e98cd679a 17934:366c198c896d
2775 2775
2776 guarantee_property(_max_bootstrap_specifier_index < attribute_array_length, 2776 guarantee_property(_max_bootstrap_specifier_index < attribute_array_length,
2777 "Short length on BootstrapMethods in class file %s", 2777 "Short length on BootstrapMethods in class file %s",
2778 CHECK); 2778 CHECK);
2779 2779
2780 guarantee_property(attribute_byte_length > sizeof(u2), 2780 guarantee_property(attribute_byte_length >= sizeof(u2),
2781 "Invalid BootstrapMethods attribute length %u in class file %s", 2781 "Invalid BootstrapMethods attribute length %u in class file %s",
2782 attribute_byte_length, 2782 attribute_byte_length,
2783 CHECK); 2783 CHECK);
2784 2784
2785 // The attribute contains a counted array of counted tuples of shorts, 2785 // The attribute contains a counted array of counted tuples of shorts,