OpenJDK / amber / amber
changeset 58242:d62c7224d5b7
8231993: Remove redundant pkg_str param from is_shared_class_visible_for_classloader
Reviewed-by: hseigel, coleenp
author | redestad |
---|---|
date | Tue, 08 Oct 2019 15:48:36 +0200 |
parents | b0a731a6642b |
children | 03165abce4cc |
files | src/hotspot/share/classfile/systemDictionary.cpp src/hotspot/share/classfile/systemDictionaryShared.cpp src/hotspot/share/classfile/systemDictionaryShared.hpp |
diffstat | 3 files changed, 3 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/hotspot/share/classfile/systemDictionary.cpp Tue Oct 08 15:08:59 2019 +0200 +++ b/src/hotspot/share/classfile/systemDictionary.cpp Tue Oct 08 15:48:36 2019 +0200 @@ -1205,10 +1205,8 @@ 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); } @@ -1245,7 +1243,7 @@ // 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 || + if (pkg_name == NULL || pkg_entry == NULL || pkg_entry->in_unnamed_module()) { assert(mod_entry == NULL || @@ -1257,8 +1255,7 @@ 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)); + ik, class_loader, pkg_name, pkg_entry, mod_entry, CHECK_(false)); return res; } }
--- a/src/hotspot/share/classfile/systemDictionaryShared.cpp Tue Oct 08 15:08:59 2019 +0200 +++ b/src/hotspot/share/classfile/systemDictionaryShared.cpp Tue Oct 08 15:48:36 2019 +0200 @@ -657,7 +657,6 @@ bool SystemDictionaryShared::is_shared_class_visible_for_classloader( InstanceKlass* ik, Handle class_loader, - const char* pkg_string, Symbol* pkg_name, PackageEntry* pkg_entry, ModuleEntry* mod_entry, @@ -684,7 +683,7 @@ } } else if (SystemDictionary::is_system_class_loader(class_loader())) { assert(ent != NULL, "shared class for system loader should have valid SharedClassPathEntry"); - if (pkg_string == NULL) { + if (pkg_name == NULL) { // The archived class is in the unnamed package. Currently, the boot image // does not contain any class in the unnamed package. assert(!ent->is_modules_image(), "Class in the unnamed package must be from the classpath");
--- a/src/hotspot/share/classfile/systemDictionaryShared.hpp Tue Oct 08 15:08:59 2019 +0200 +++ b/src/hotspot/share/classfile/systemDictionaryShared.hpp Tue Oct 08 15:48:36 2019 +0200 @@ -240,7 +240,6 @@ static bool is_sharing_possible(ClassLoaderData* loader_data); static bool is_shared_class_visible_for_classloader(InstanceKlass* ik, Handle class_loader, - const char* pkg_string, Symbol* pkg_name, PackageEntry* pkg_entry, ModuleEntry* mod_entry,