< prev index next >
src/hotspot/share/classfile/classLoaderExt.cpp
Print this page
@@ -60,12 +60,11 @@
}
ClassLoader::add_to_boot_append_entries(new_entry);
}
void ClassLoaderExt::setup_app_search_path() {
- assert(DumpSharedSpaces || DynamicDumpSharedSpaces,
- "this function is only used at CDS dump time");
+ Arguments::assert_is_dumping_archive();
_app_class_paths_start_index = ClassLoader::num_boot_classpath_entries();
char* app_class_path = os::strdup(Arguments::get_appclasspath());
if (strcmp(app_class_path, ".") == 0) {
// This doesn't make any sense, even for AppCDS, so let's skip it. We
@@ -90,12 +89,11 @@
m = m->next();
}
}
}
void ClassLoaderExt::setup_module_paths(TRAPS) {
- assert(DumpSharedSpaces || DynamicDumpSharedSpaces,
- "this function is only used with CDS dump time");
+ Arguments::assert_is_dumping_archive();
_app_module_paths_start_index = ClassLoader::num_boot_classpath_entries() +
ClassLoader::num_app_classpath_entries();
Handle system_class_loader (THREAD, SystemDictionary::java_system_loader());
ModuleEntryTable* met = Modules::get_module_entry_table(system_class_loader);
process_module_table(met, THREAD);
@@ -229,11 +227,11 @@
}
void ClassLoaderExt::record_result(const s2 classpath_index,
InstanceKlass* result,
TRAPS) {
- assert(DumpSharedSpaces || DynamicDumpSharedSpaces, "Sanity");
+ Arguments::assert_is_dumping_archive();
// We need to remember where the class comes from during dumping.
oop loader = result->class_loader();
s2 classloader_type = ClassLoader::BOOT_LOADER;
if (SystemDictionary::is_system_class_loader(loader)) {
< prev index next >