diff -r c49a13526ba9 -r 73d58f4c918a src/share/vm/classfile/classFileParser.cpp --- a/src/share/vm/classfile/classFileParser.cpp Fri Oct 16 19:12:56 2020 +0100 +++ b/src/share/vm/classfile/classFileParser.cpp Fri Oct 16 19:25:10 2020 +0100 @@ -3717,16 +3717,6 @@ info->has_nonstatic_fields = has_nonstatic_fields; } -static bool relax_format_check_for(ClassLoaderData* loader_data) { - bool trusted = (loader_data->is_the_null_class_loader_data() || - SystemDictionary::is_ext_class_loader(loader_data->class_loader())); - bool need_verify = - // verifyAll - (BytecodeVerificationLocal && BytecodeVerificationRemote) || - // verifyRemote - (!BytecodeVerificationLocal && BytecodeVerificationRemote && !trusted); - return !need_verify; -} instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name, ClassLoaderData* loader_data, @@ -3873,7 +3863,7 @@ // Check if verification needs to be relaxed for this class file // Do not restrict it to jdk1.0 or jdk1.1 to maintain backward compatibility (4982376) - _relax_verify = relax_format_check_for(_loader_data); + _relax_verify = Verifier::relax_verify_for(class_loader()); // Constant pool constantPoolHandle cp = parse_constant_pool(CHECK_(nullHandle));