src/hotspot/share/classfile/systemDictionary.cpp
changeset 53884 1a7b57d02107
parent 53776 7c17199fa37d
child 54511 fbfcebad8e66
equal deleted inserted replaced
53883:f41793b5b83f 53884:1a7b57d02107
  1172 // forces the super class and all interfaces to be loaded.
  1172 // forces the super class and all interfaces to be loaded.
  1173 InstanceKlass* SystemDictionary::load_shared_boot_class(Symbol* class_name,
  1173 InstanceKlass* SystemDictionary::load_shared_boot_class(Symbol* class_name,
  1174                                                         TRAPS) {
  1174                                                         TRAPS) {
  1175   InstanceKlass* ik = SystemDictionaryShared::find_builtin_class(class_name);
  1175   InstanceKlass* ik = SystemDictionaryShared::find_builtin_class(class_name);
  1176   if (ik != NULL && ik->is_shared_boot_class()) {
  1176   if (ik != NULL && ik->is_shared_boot_class()) {
  1177     return load_shared_class(ik, Handle(), Handle(), THREAD);
  1177     return load_shared_class(ik, Handle(), Handle(), NULL, THREAD);
  1178   }
  1178   }
  1179   return NULL;
  1179   return NULL;
  1180 }
  1180 }
  1181 
  1181 
  1182 // Check if a shared class can be loaded by the specific classloader:
  1182 // Check if a shared class can be loaded by the specific classloader:
  1272   }
  1272   }
  1273 }
  1273 }
  1274 
  1274 
  1275 InstanceKlass* SystemDictionary::load_shared_class(InstanceKlass* ik,
  1275 InstanceKlass* SystemDictionary::load_shared_class(InstanceKlass* ik,
  1276                                                    Handle class_loader,
  1276                                                    Handle class_loader,
  1277                                                    Handle protection_domain, TRAPS) {
  1277                                                    Handle protection_domain,
       
  1278                                                    const ClassFileStream *cfs,
       
  1279                                                    TRAPS) {
  1278 
  1280 
  1279   if (ik != NULL) {
  1281   if (ik != NULL) {
  1280     Symbol* class_name = ik->name();
  1282     Symbol* class_name = ik->name();
  1281 
  1283 
  1282     bool visible = is_shared_class_visible(
  1284     bool visible = is_shared_class_visible(
  1319         assert(i->is_shared(), "must be");
  1321         assert(i->is_shared(), "must be");
  1320       }
  1322       }
  1321     }
  1323     }
  1322 
  1324 
  1323     InstanceKlass* new_ik = KlassFactory::check_shared_class_file_load_hook(
  1325     InstanceKlass* new_ik = KlassFactory::check_shared_class_file_load_hook(
  1324         ik, class_name, class_loader, protection_domain, CHECK_NULL);
  1326         ik, class_name, class_loader, protection_domain, cfs, CHECK_NULL);
  1325     if (new_ik != NULL) {
  1327     if (new_ik != NULL) {
  1326       // The class is changed by CFLH. Return the new class. The shared class is
  1328       // The class is changed by CFLH. Return the new class. The shared class is
  1327       // not used.
  1329       // not used.
  1328       return new_ik;
  1330       return new_ik;
  1329     }
  1331     }