938 } else { 939 Symbol* const unresolved_klass = cp->klass_name_at(interface_index); 940 941 // Don't need to check legal name because it's checked when parsing constant pool. 942 // But need to make sure it's not an array type. 943 guarantee_property(unresolved_klass->byte_at(0) != JVM_SIGNATURE_ARRAY, 944 "Bad interface name in class file %s", CHECK); 945 946 // Call resolve_super so classcircularity is checked 947 interf = SystemDictionary::resolve_super_or_fail( 948 _class_name, 949 unresolved_klass, 950 Handle(THREAD, _loader_data->class_loader()), 951 _protection_domain, 952 false, 953 CHECK); 954 } 955 956 if (!interf->is_interface()) { 957 THROW_MSG(vmSymbols::java_lang_IncompatibleClassChangeError(), 958 err_msg("Class %s can not implement %s, because it is not an interface", 959 _class_name->as_klass_external_name(), 960 interf->class_loader_and_module_name())); 961 } 962 963 if (InstanceKlass::cast(interf)->has_nonstatic_concrete_methods()) { 964 *has_nonstatic_concrete_methods = true; 965 } 966 _local_interfaces->at_put(index, interf); 967 } 968 969 if (!_need_verify || itfs_len <= 1) { 970 return; 971 } 972 973 // Check if there's any duplicates in interfaces 974 ResourceMark rm(THREAD); 975 NameSigHash** interface_names = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD, 976 NameSigHash*, 977 HASH_ROW_SIZE); 978 initialize_hashtable(interface_names); 979 bool dup = false; 980 const Symbol* name = NULL; | 938 } else { 939 Symbol* const unresolved_klass = cp->klass_name_at(interface_index); 940 941 // Don't need to check legal name because it's checked when parsing constant pool. 942 // But need to make sure it's not an array type. 943 guarantee_property(unresolved_klass->byte_at(0) != JVM_SIGNATURE_ARRAY, 944 "Bad interface name in class file %s", CHECK); 945 946 // Call resolve_super so classcircularity is checked 947 interf = SystemDictionary::resolve_super_or_fail( 948 _class_name, 949 unresolved_klass, 950 Handle(THREAD, _loader_data->class_loader()), 951 _protection_domain, 952 false, 953 CHECK); 954 } 955 956 if (!interf->is_interface()) { 957 THROW_MSG(vmSymbols::java_lang_IncompatibleClassChangeError(), 958 err_msg("class %s can not implement %s, because it is not an interface (%s)", 959 _class_name->as_klass_external_name(), 960 interf->external_name(), 961 interf->class_in_module_of_loader())); 962 } 963 964 if (InstanceKlass::cast(interf)->has_nonstatic_concrete_methods()) { 965 *has_nonstatic_concrete_methods = true; 966 } 967 _local_interfaces->at_put(index, interf); 968 } 969 970 if (!_need_verify || itfs_len <= 1) { 971 return; 972 } 973 974 // Check if there's any duplicates in interfaces 975 ResourceMark rm(THREAD); 976 NameSigHash** interface_names = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD, 977 NameSigHash*, 978 HASH_ROW_SIZE); 979 initialize_hashtable(interface_names); 980 bool dup = false; 981 const Symbol* name = NULL; |