< prev index next >

src/hotspot/share/classfile/classFileParser.cpp

Print this page




3475           if (parsed_nest_members_attribute) {
3476             classfile_parse_error("Multiple NestMembers attributes in class file %s", CHECK);
3477           } else {
3478             parsed_nest_members_attribute = true;
3479           }
3480           if (parsed_nest_host_attribute) {
3481             classfile_parse_error("Conflicting NestHost and NestMembers attributes in class file %s", CHECK);
3482           }
3483           nest_members_attribute_start = cfs->current();
3484           nest_members_attribute_length = attribute_length;
3485           cfs->skip_u1(nest_members_attribute_length, CHECK);
3486         } else if (tag == vmSymbols::tag_nest_host()) {
3487           if (parsed_nest_host_attribute) {
3488             classfile_parse_error("Multiple NestHost attributes in class file %s", CHECK);
3489           } else {
3490             parsed_nest_host_attribute = true;
3491           }
3492           if (parsed_nest_members_attribute) {
3493             classfile_parse_error("Conflicting NestMembers and NestHost attributes in class file %s", CHECK);
3494           }



3495           cfs->guarantee_more(2, CHECK);
3496           u2 class_info_index = cfs->get_u2_fast();
3497           check_property(
3498                          valid_klass_reference_at(class_info_index),
3499                          "Nest-host class_info_index %u has bad constant type in class file %s",
3500                          class_info_index, CHECK);
3501           _nest_host = class_info_index;
3502         }
3503       } else {
3504         // Unknown attribute
3505         cfs->skip_u1(attribute_length, CHECK);
3506       }
3507     } else {
3508       // Unknown attribute
3509       cfs->skip_u1(attribute_length, CHECK);
3510     }
3511   }
3512   _annotations = assemble_annotations(runtime_visible_annotations,
3513                                       runtime_visible_annotations_length,
3514                                       runtime_invisible_annotations,




3475           if (parsed_nest_members_attribute) {
3476             classfile_parse_error("Multiple NestMembers attributes in class file %s", CHECK);
3477           } else {
3478             parsed_nest_members_attribute = true;
3479           }
3480           if (parsed_nest_host_attribute) {
3481             classfile_parse_error("Conflicting NestHost and NestMembers attributes in class file %s", CHECK);
3482           }
3483           nest_members_attribute_start = cfs->current();
3484           nest_members_attribute_length = attribute_length;
3485           cfs->skip_u1(nest_members_attribute_length, CHECK);
3486         } else if (tag == vmSymbols::tag_nest_host()) {
3487           if (parsed_nest_host_attribute) {
3488             classfile_parse_error("Multiple NestHost attributes in class file %s", CHECK);
3489           } else {
3490             parsed_nest_host_attribute = true;
3491           }
3492           if (parsed_nest_members_attribute) {
3493             classfile_parse_error("Conflicting NestMembers and NestHost attributes in class file %s", CHECK);
3494           }
3495           if (_need_verify) {
3496             guarantee_property(attribute_length == 2, "Wrong NestHost attribute length in class file %s", CHECK);
3497           }
3498           cfs->guarantee_more(2, CHECK);
3499           u2 class_info_index = cfs->get_u2_fast();
3500           check_property(
3501                          valid_klass_reference_at(class_info_index),
3502                          "Nest-host class_info_index %u has bad constant type in class file %s",
3503                          class_info_index, CHECK);
3504           _nest_host = class_info_index;
3505         }
3506       } else {
3507         // Unknown attribute
3508         cfs->skip_u1(attribute_length, CHECK);
3509       }
3510     } else {
3511       // Unknown attribute
3512       cfs->skip_u1(attribute_length, CHECK);
3513     }
3514   }
3515   _annotations = assemble_annotations(runtime_visible_annotations,
3516                                       runtime_visible_annotations_length,
3517                                       runtime_invisible_annotations,


< prev index next >