SystemDictionary::load_shared_class(Symbol*, Handle, TRAPS) is only called by SystemDictionary::load_instance_class() for the NULL loader case.
To reduce confusion, SystemDictionary::load_shared_class(Symbol*, Handle, TRAPS) should be renamed to SystemDictionary::load_shared_boot_class(). The code can be simplified to remove the loader check. The class loader Handle argument can also be removed.
-InstanceKlass* SystemDictionary::load_shared_class(
- Symbol* class_name, Handle class_loader, TRAPS) {
+InstanceKlass* SystemDictionary::load_shared_boot_class(
+ Symbol* class_name, TRAPS) {
InstanceKlass* ik = find_shared_class(class_name);
// Make sure we only return the boot class for the NULL classloader.
- if (ik != NULL &&
- ik->is_shared_boot_class() && class_loader.is_null()) {
+ if (ik != NULL && ik->is_shared_boot_class()) {
Handle protection_domain;
- return load_shared_class(ik, class_loader, protection_domain, THREAD);
+ return load_shared_class(ik, Handle(), protection_domain, THREAD);
}
return NULL;
}
To reduce confusion, SystemDictionary::load_shared_class(Symbol*, Handle, TRAPS) should be renamed to SystemDictionary::load_shared_boot_class(). The code can be simplified to remove the loader check. The class loader Handle argument can also be removed.
-InstanceKlass* SystemDictionary::load_shared_class(
- Symbol* class_name, Handle class_loader, TRAPS) {
+InstanceKlass* SystemDictionary::load_shared_boot_class(
+ Symbol* class_name, TRAPS) {
InstanceKlass* ik = find_shared_class(class_name);
// Make sure we only return the boot class for the NULL classloader.
- if (ik != NULL &&
- ik->is_shared_boot_class() && class_loader.is_null()) {
+ if (ik != NULL && ik->is_shared_boot_class()) {
Handle protection_domain;
- return load_shared_class(ik, class_loader, protection_domain, THREAD);
+ return load_shared_class(ik, Handle(), protection_domain, THREAD);
}
return NULL;
}