2982 } |
2982 } |
2983 cfs->skip_u1(attribute_length, CHECK); |
2983 cfs->skip_u1(attribute_length, CHECK); |
2984 } else if (tag == vmSymbols::tag_enclosing_method()) { |
2984 } else if (tag == vmSymbols::tag_enclosing_method()) { |
2985 if (parsed_enclosingmethod_attribute) { |
2985 if (parsed_enclosingmethod_attribute) { |
2986 classfile_parse_error("Multiple EnclosingMethod attributes in class file %s", CHECK); |
2986 classfile_parse_error("Multiple EnclosingMethod attributes in class file %s", CHECK); |
2987 } else { |
2987 } else { |
2988 parsed_enclosingmethod_attribute = true; |
2988 parsed_enclosingmethod_attribute = true; |
2989 } |
2989 } |
|
2990 guarantee_property(attribute_length == 4, |
|
2991 "Wrong EnclosingMethod attribute length %u in class file %s", |
|
2992 attribute_length, CHECK); |
2990 cfs->guarantee_more(4, CHECK); // class_index, method_index |
2993 cfs->guarantee_more(4, CHECK); // class_index, method_index |
2991 enclosing_method_class_index = cfs->get_u2_fast(); |
2994 enclosing_method_class_index = cfs->get_u2_fast(); |
2992 enclosing_method_method_index = cfs->get_u2_fast(); |
2995 enclosing_method_method_index = cfs->get_u2_fast(); |
2993 if (enclosing_method_class_index == 0) { |
2996 if (enclosing_method_class_index == 0) { |
2994 classfile_parse_error("Invalid class index in EnclosingMethod attribute in class file %s", CHECK); |
2997 classfile_parse_error("Invalid class index in EnclosingMethod attribute in class file %s", CHECK); |