< prev index next >
src/hotspot/share/classfile/systemDictionary.cpp
Print this page
rev 58452 : imported patch pkg_name_from_class
*** 1195,1208 ****
"Loading non-bootstrap classes before the module system is initialized");
assert(class_loader.is_null(), "sanity");
return true;
}
// Get the pkg_entry from the classloader
- TempNewSymbol pkg_name = NULL;
PackageEntry* pkg_entry = NULL;
ModuleEntry* mod_entry = NULL;
! pkg_name = InstanceKlass::package_from_name(class_name, CHECK_false);
if (pkg_name != NULL) {
if (loader_data != NULL) {
pkg_entry = loader_data->packages()->lookup_only(pkg_name);
}
if (pkg_entry != NULL) {
--- 1195,1207 ----
"Loading non-bootstrap classes before the module system is initialized");
assert(class_loader.is_null(), "sanity");
return true;
}
// Get the pkg_entry from the classloader
PackageEntry* pkg_entry = NULL;
ModuleEntry* mod_entry = NULL;
! TempNewSymbol pkg_name = InstanceKlass::package_from_name(class_name);
if (pkg_name != NULL) {
if (loader_data != NULL) {
pkg_entry = loader_data->packages()->lookup_only(pkg_name);
}
if (pkg_entry != NULL) {
*** 1355,1366 ****
// For boot loader, ensure that GetSystemPackage knows that a class in this
// package was loaded.
if (loader_data->is_the_null_class_loader_data()) {
int path_index = ik->shared_classpath_index();
! ResourceMark rm(THREAD);
! ClassLoader::add_package(ik->name()->as_C_string(), path_index, THREAD);
}
if (DumpLoadedClassList != NULL && classlist_file->is_open()) {
// Only dump the classes that can be stored into CDS archive
if (SystemDictionaryShared::is_sharing_possible(loader_data)) {
--- 1354,1364 ----
// For boot loader, ensure that GetSystemPackage knows that a class in this
// package was loaded.
if (loader_data->is_the_null_class_loader_data()) {
int path_index = ik->shared_classpath_index();
! ClassLoader::add_package(ik, path_index, THREAD);
}
if (DumpLoadedClassList != NULL && classlist_file->is_open()) {
// Only dump the classes that can be stored into CDS archive
if (SystemDictionaryShared::is_sharing_possible(loader_data)) {
*** 1428,1438 ****
PackageEntry* pkg_entry = NULL;
bool search_only_bootloader_append = false;
ClassLoaderData *loader_data = class_loader_data(class_loader);
// Find the package in the boot loader's package entry table.
! TempNewSymbol pkg_name = InstanceKlass::package_from_name(class_name, CHECK_NULL);
if (pkg_name != NULL) {
pkg_entry = loader_data->packages()->lookup_only(pkg_name);
}
// Prior to attempting to load the class, enforce the boot loader's
--- 1426,1436 ----
PackageEntry* pkg_entry = NULL;
bool search_only_bootloader_append = false;
ClassLoaderData *loader_data = class_loader_data(class_loader);
// Find the package in the boot loader's package entry table.
! TempNewSymbol pkg_name = InstanceKlass::package_from_name(class_name);
if (pkg_name != NULL) {
pkg_entry = loader_data->packages()->lookup_only(pkg_name);
}
// Prior to attempting to load the class, enforce the boot loader's
< prev index next >