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);
_nest_host = class_info_index;
} else if (_major_version >= JAVA_15_VERSION) {
// Check for PermittedSubclasses tag
if (tag == vmSymbols::tag_permitted_subclasses()) {
} 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;
} else if (tag == vmSymbols::tag_permitted_subclasses()) {
if (supports_sealed_types()) {
if (parsed_permitted_subclasses_attribute) {
classfile_parse_error("Multiple PermittedSubclasses attributes in class file %s", CHECK);
@ -3910,23 +3917,9 @@ void ClassFileParser::parse_classfile_attributes(const ClassFileStream* const cf
permitted_subclasses_attribute_start = cfs->current();
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;
}
cfs->skip_u1(attribute_length, CHECK);
} else {
// Unknown attribute
cfs->skip_u1(attribute_length, CHECK);
}
// Skip attribute_length for any attribute where major_verson >= JAVA_16_VERSION
cfs->skip_u1(attribute_length, CHECK);
} else {
// Unknown attribute
cfs->skip_u1(attribute_length, CHECK);