< prev index next >

src/hotspot/share/classfile/systemDictionary.cpp

Print this page

        

@@ -1187,24 +1187,19 @@
     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) {
+// Load a class for boot loader from the shared spaces (found through
+// the shared system dictionary). Force the super class and all interfaces
+// to be loaded.
+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()) {
-    Handle protection_domain;
-    return load_shared_class(ik, class_loader, protection_domain, THREAD);
+  // Make sure we only return the boot class.
+  if (ik != NULL && ik->is_shared_boot_class()) {
+    return load_shared_class(ik, Handle(), Handle(), THREAD);
   }
   return NULL;
 }
 
 // Check if a shared class can be loaded by the specific classloader:

@@ -1493,11 +1488,11 @@
     // shared spaces.
     InstanceKlass* k = NULL;
     {
 #if INCLUDE_CDS
       PerfTraceTime vmtimer(ClassLoader::perf_shared_classload_time());
-      k = load_shared_class(class_name, class_loader, THREAD);
+      k = load_shared_boot_class(class_name, THREAD);
 #endif
     }
 
     if (k == NULL) {
       // Use VM class loader
< prev index next >