-
Enhancement
-
Resolution: Fixed
-
P4
-
23
-
b11
We have:
ClassLoader::load_class(Symbol* name, bool search_append_only, TRAPS) {
then:
const char* const class_name = name->as_C_string();
then
stream = search_module_entries(THREAD, XXXX, class_name, file_name);
where:
ClassFileStream* ClassLoader::search_module_entries(JavaThread* current,
const GrowableArray<ModuleClassPathList*>* const module_list,
const char* const class_name,
const char* const file_name) {
ClassFileStream* stream = nullptr;
// Find the class' defining module in the boot loader's module entry table
TempNewSymbol class_name_symbol = SymbolTable::new_symbol(class_name);
So we started with a Symbol, converted it to char* and passed it to a function that turned it back into a Symbol! We could just pass the original Symbol directly.
ClassLoader::load_class(Symbol* name, bool search_append_only, TRAPS) {
then:
const char* const class_name = name->as_C_string();
then
stream = search_module_entries(THREAD, XXXX, class_name, file_name);
where:
ClassFileStream* ClassLoader::search_module_entries(JavaThread* current,
const GrowableArray<ModuleClassPathList*>* const module_list,
const char* const class_name,
const char* const file_name) {
ClassFileStream* stream = nullptr;
// Find the class' defining module in the boot loader's module entry table
TempNewSymbol class_name_symbol = SymbolTable::new_symbol(class_name);
So we started with a Symbol, converted it to char* and passed it to a function that turned it back into a Symbol! We could just pass the original Symbol directly.