< prev index next >

src/hotspot/share/classfile/systemDictionary.cpp

Print this page
rev 56505 : 8231993: Remove redundant pkg_str param from is_shared_class_visible_for_classloader
Reviewed-by: jiangli, iklam

*** 1203,1216 **** } // Get the pkg_entry from the classloader TempNewSymbol pkg_name = NULL; PackageEntry* pkg_entry = NULL; ModuleEntry* mod_entry = NULL; - const char* pkg_string = NULL; pkg_name = InstanceKlass::package_from_name(class_name, CHECK_false); if (pkg_name != NULL) { - pkg_string = pkg_name->as_C_string(); if (loader_data != NULL) { pkg_entry = loader_data->packages()->lookup_only(pkg_name); } if (pkg_entry != NULL) { mod_entry = pkg_entry->module(); --- 1203,1214 ----
*** 1243,1253 **** // 1. the class is from the unamed package // 2. or, the class is not from a module defined in the NULL classloader // 3. or, the class is from an unamed module if (!ent->is_modules_image() && ik->is_shared_boot_class()) { // the class is from the -Xbootclasspath/a ! if (pkg_string == NULL || pkg_entry == NULL || pkg_entry->in_unnamed_module()) { assert(mod_entry == NULL || mod_entry == loader_data->unnamed_module(), "the unnamed module is not defined in the classloader"); --- 1241,1251 ---- // 1. the class is from the unamed package // 2. or, the class is not from a module defined in the NULL classloader // 3. or, the class is from an unamed module if (!ent->is_modules_image() && ik->is_shared_boot_class()) { // the class is from the -Xbootclasspath/a ! if (pkg_name == NULL || pkg_entry == NULL || pkg_entry->in_unnamed_module()) { assert(mod_entry == NULL || mod_entry == loader_data->unnamed_module(), "the unnamed module is not defined in the classloader");
*** 1255,1266 **** } } return false; } else { bool res = SystemDictionaryShared::is_shared_class_visible_for_classloader( ! ik, class_loader, pkg_string, pkg_name, ! pkg_entry, mod_entry, CHECK_(false)); return res; } } InstanceKlass* SystemDictionary::load_shared_class(InstanceKlass* ik, --- 1253,1263 ---- } } return false; } else { bool res = SystemDictionaryShared::is_shared_class_visible_for_classloader( ! ik, class_loader, pkg_name, pkg_entry, mod_entry, CHECK_(false)); return res; } } InstanceKlass* SystemDictionary::load_shared_class(InstanceKlass* ik,
< prev index next >