2064 stringStream ss;
2065 _exception_type = vmSymbols::java_lang_ClassFormatError();
2066 va_list va;
2067 va_start(va, msg);
2068 ss.vprint(msg, va);
2069 va_end(va);
2070 if (!_method.is_null()) {
2071 ss.print(" in method '");
2072 _method->print_external_name(&ss);
2073 ss.print("'");
2074 }
2075 _message = ss.as_string();
2076 }
2077
2078 Klass* ClassVerifier::load_class(Symbol* name, TRAPS) {
2079 HandleMark hm(THREAD);
2080 // Get current loader and protection domain first.
2081 oop loader = current_class()->class_loader();
2082 oop protection_domain = current_class()->protection_domain();
2083
2084 Klass* kls = SystemDictionary::resolve_or_fail(
2085 name, Handle(THREAD, loader), Handle(THREAD, protection_domain),
2086 true, THREAD);
2087
2088 if (kls != NULL) {
2089 if (log_is_enabled(Debug, class, resolve)) {
2090 Verifier::trace_class_resolution(kls, current_class());
2091 }
2092 }
2093 return kls;
2094 }
2095
2096 bool ClassVerifier::is_protected_access(InstanceKlass* this_class,
2097 Klass* target_class,
2098 Symbol* field_name,
2099 Symbol* field_sig,
2100 bool is_method) {
2101 NoSafepointVerifier nosafepoint;
2102
2103 // If target class isn't a super class of this class, we don't worry about this case
|
2064 stringStream ss;
2065 _exception_type = vmSymbols::java_lang_ClassFormatError();
2066 va_list va;
2067 va_start(va, msg);
2068 ss.vprint(msg, va);
2069 va_end(va);
2070 if (!_method.is_null()) {
2071 ss.print(" in method '");
2072 _method->print_external_name(&ss);
2073 ss.print("'");
2074 }
2075 _message = ss.as_string();
2076 }
2077
2078 Klass* ClassVerifier::load_class(Symbol* name, TRAPS) {
2079 HandleMark hm(THREAD);
2080 // Get current loader and protection domain first.
2081 oop loader = current_class()->class_loader();
2082 oop protection_domain = current_class()->protection_domain();
2083
2084 assert(name_in_supers(name, current_class()), "name should be a super class");
2085
2086 Klass* kls = SystemDictionary::resolve_or_fail(
2087 name, Handle(THREAD, loader), Handle(THREAD, protection_domain),
2088 true, THREAD);
2089
2090 if (kls != NULL) {
2091 if (log_is_enabled(Debug, class, resolve)) {
2092 Verifier::trace_class_resolution(kls, current_class());
2093 }
2094 }
2095 return kls;
2096 }
2097
2098 bool ClassVerifier::is_protected_access(InstanceKlass* this_class,
2099 Klass* target_class,
2100 Symbol* field_name,
2101 Symbol* field_sig,
2102 bool is_method) {
2103 NoSafepointVerifier nosafepoint;
2104
2105 // If target class isn't a super class of this class, we don't worry about this case
|