< prev index next >
src/hotspot/share/classfile/systemDictionary.cpp
Print this page
*** 1187,1208 ****
return NULL;
}
}
! // Load a class from the shared spaces (found through the shared system
! // dictionary). Force the superclass and all interfaces to be loaded.
! // Update the class definition to include sibling classes and no
! // subclasses (yet). [Classes in the shared space are not part of the
! // object hierarchy until loaded.]
! InstanceKlass* SystemDictionary::load_shared_class(
Symbol* class_name, Handle class_loader, 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()) {
Handle protection_domain;
return load_shared_class(ik, class_loader, protection_domain, THREAD);
}
return NULL;
}
--- 1187,1208 ----
return NULL;
}
}
! // Load a class for boot loader from the shared spaces (found through
! // the shared system dictionary). Force the superclass and all interfaces
! // to be loaded. Update the class definition to include sibling classes
! // and no subclasses (yet). [Classes in the shared space are not part of
! // the object hierarchy until loaded.]
! InstanceKlass* SystemDictionary::load_shared_boot_class(
Symbol* class_name, Handle class_loader, TRAPS) {
+ assert(class_loader.is_null(), "Must be the NULL classloader");
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()) {
Handle protection_domain;
return load_shared_class(ik, class_loader, protection_domain, THREAD);
}
return NULL;
}
*** 1493,1503 ****
// shared spaces.
InstanceKlass* k = NULL;
{
#if INCLUDE_CDS
PerfTraceTime vmtimer(ClassLoader::perf_shared_classload_time());
! k = load_shared_class(class_name, class_loader, THREAD);
#endif
}
if (k == NULL) {
// Use VM class loader
--- 1493,1503 ----
// shared spaces.
InstanceKlass* k = NULL;
{
#if INCLUDE_CDS
PerfTraceTime vmtimer(ClassLoader::perf_shared_classload_time());
! k = load_shared_boot_class(class_name, class_loader, THREAD);
#endif
}
if (k == NULL) {
// Use VM class loader
< prev index next >