Skip to content

Commit

Permalink
8255005: Fix indentation levels in classFileParser.cpp
Browse files Browse the repository at this point in the history
Reviewed-by: lfoltan, coleenp
  • Loading branch information
Harold Seigel committed Oct 30, 2020
1 parent e48016b commit 8a065ef
Showing 1 changed file with 12 additions and 19 deletions.
31 changes: 12 additions & 19 deletions src/hotspot/share/classfile/classFileParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

1 comment on commit 8a065ef

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.