# HG changeset patch # User lfoltan # Date 1408996630 14400 # Node ID 72fa1e83e5f906b1605d2cb8313a5d7b9a090dfd # Parent c3990b8c710e4c1996b5cd579681645d9f0408c1 8051002: Incorrectly merged share/vm/classfile/classFileParser.cpp was pushed to 8u20. Summary: Correct fix for allowing BootstrapMethods attribute with an empty bootstrap_methods table. Reviewed-by: coleenp, ctornqvi, hseigel diff -r c3990b8c710e -r 72fa1e83e5f9 src/share/vm/classfile/classFileParser.cpp --- a/src/share/vm/classfile/classFileParser.cpp Mon Aug 25 08:20:17 2014 +0200 +++ b/src/share/vm/classfile/classFileParser.cpp Mon Aug 25 15:57:10 2014 -0400 @@ -2780,7 +2780,7 @@ ClassFileStream* cfs = stream(); u1* current_start = cfs->current(); - guarantee_property(attribute_byte_length > sizeof(u2), + guarantee_property(attribute_byte_length >= sizeof(u2), "Invalid BootstrapMethods attribute length %u in class file %s", attribute_byte_length, CHECK); @@ -2793,11 +2793,6 @@ "Short length on BootstrapMethods in class file %s", CHECK); - guarantee_property(attribute_byte_length >= sizeof(u2), - "Invalid BootstrapMethods attribute length %u in class file %s", - attribute_byte_length, - CHECK); - // The attribute contains a counted array of counted tuples of shorts, // represending bootstrap specifiers: // length*{bootstrap_method_index, argument_count*{argument_index}}