8255005: Fix indentation levels in classFileParser.cpp

Reviewed-by: lfoltan, coleenp
This commit is contained in:
Harold Seigel 2020-10-30 12:56:15 +00:00
parent e48016b163
commit 8a065ef2e2

View File

@ -3893,9 +3893,16 @@ void ClassFileParser::parse_classfile_attributes(const ClassFileStream* const cf
class_info_index, CHECK); class_info_index, CHECK);
_nest_host = class_info_index; _nest_host = class_info_index;
} else if (_major_version >= JAVA_15_VERSION) { } else if (_major_version >= JAVA_16_VERSION) {
// Check for PermittedSubclasses tag if (tag == vmSymbols::tag_record()) {
if (tag == vmSymbols::tag_permitted_subclasses()) { if (parsed_record_attribute) {
classfile_parse_error("Multiple Record attributes in class file %s", THREAD);
return;
}
parsed_record_attribute = true;
record_attribute_start = cfs->current();
record_attribute_length = attribute_length;
} else if (tag == vmSymbols::tag_permitted_subclasses()) {
if (supports_sealed_types()) { if (supports_sealed_types()) {
if (parsed_permitted_subclasses_attribute) { if (parsed_permitted_subclasses_attribute) {
classfile_parse_error("Multiple PermittedSubclasses attributes in class file %s", CHECK); classfile_parse_error("Multiple PermittedSubclasses attributes in class file %s", CHECK);
@ -3910,18 +3917,8 @@ void ClassFileParser::parse_classfile_attributes(const ClassFileStream* const cf
permitted_subclasses_attribute_start = cfs->current(); permitted_subclasses_attribute_start = cfs->current();
permitted_subclasses_attribute_length = attribute_length; permitted_subclasses_attribute_length = attribute_length;
} }
cfs->skip_u1(attribute_length, CHECK);
} else if (_major_version >= JAVA_16_VERSION) {
if (tag == vmSymbols::tag_record()) {
if (parsed_record_attribute) {
classfile_parse_error("Multiple Record attributes in class file %s", THREAD);
return;
}
parsed_record_attribute = true;
record_attribute_start = cfs->current();
record_attribute_length = attribute_length;
} }
// Skip attribute_length for any attribute where major_verson >= JAVA_16_VERSION
cfs->skip_u1(attribute_length, CHECK); cfs->skip_u1(attribute_length, CHECK);
} else { } else {
// Unknown attribute // Unknown attribute
@ -3935,10 +3932,6 @@ void ClassFileParser::parse_classfile_attributes(const ClassFileStream* const cf
// Unknown attribute // Unknown attribute
cfs->skip_u1(attribute_length, CHECK); cfs->skip_u1(attribute_length, CHECK);
} }
} else {
// Unknown attribute
cfs->skip_u1(attribute_length, CHECK);
}
} }
_class_annotations = assemble_annotations(runtime_visible_annotations, _class_annotations = assemble_annotations(runtime_visible_annotations,
runtime_visible_annotations_length, runtime_visible_annotations_length,