mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-16 00:54:38 +02:00
8329112: Clean up CDS checking of unsupported module options
Reviewed-by: ccheung, matsaave
This commit is contained in:
parent
59c2aff1ed
commit
5b05f8e0c4
4 changed files with 48 additions and 47 deletions
|
@ -1119,18 +1119,8 @@ InstanceKlass* ClassLoader::load_class(Symbol* name, PackageEntry* pkg_entry, bo
|
|||
// Note: The --patch-module entries are never searched if the boot loader's
|
||||
// visibility boundary is limited to only searching the append entries.
|
||||
if (_patch_mod_entries != nullptr && !search_append_only) {
|
||||
// At CDS dump time, the --patch-module entries are ignored. That means a
|
||||
// class is still loaded from the runtime image even if it might
|
||||
// appear in the _patch_mod_entries. The runtime shared class visibility
|
||||
// check will determine if a shared class is visible based on the runtime
|
||||
// environment, including the runtime --patch-module setting.
|
||||
//
|
||||
// Dynamic dumping requires UseSharedSpaces to be enabled. Since --patch-module
|
||||
// is not supported with UseSharedSpaces, we can never come here during dynamic dumping.
|
||||
assert(!CDSConfig::is_dumping_dynamic_archive(), "sanity");
|
||||
if (!CDSConfig::is_dumping_static_archive()) {
|
||||
stream = search_module_entries(THREAD, _patch_mod_entries, pkg_entry, file_name);
|
||||
}
|
||||
assert(!CDSConfig::is_dumping_archive(), "CDS doesn't support --patch-module during dumping");
|
||||
stream = search_module_entries(THREAD, _patch_mod_entries, pkg_entry, file_name);
|
||||
}
|
||||
|
||||
// Load Attempt #2: [jimage | exploded build]
|
||||
|
@ -1141,6 +1131,7 @@ InstanceKlass* ClassLoader::load_class(Symbol* name, PackageEntry* pkg_entry, bo
|
|||
} else {
|
||||
// Exploded build - attempt to locate class in its defining module's location.
|
||||
assert(_exploded_entries != nullptr, "No exploded build entries present");
|
||||
assert(!CDSConfig::is_dumping_archive(), "CDS dumping doesn't support exploded build");
|
||||
stream = search_module_entries(THREAD, _exploded_entries, pkg_entry, file_name);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue