8178604: JVM does not allow defining boot loader modules in exploded build after module system initialization

Allow defining of boot loader modules after initialization but add locks to synchronize access to exploded build list

Reviewed-by: dholmes, lfoltan
This commit is contained in:
Harold Seigel 2017-05-16 09:33:49 -04:00
parent dd55dfc914
commit 09d3f0e43d
2 changed files with 58 additions and 37 deletions

View file

@ -449,9 +449,8 @@ void Modules::define_module(jobject module, jboolean is_open, jstring version,
}
// If the module is defined to the boot loader and an exploded build is being
// used, prepend <java.home>/modules/modules_name, if it exists, to the system boot class path.
if (loader == NULL &&
!ClassLoader::has_jrt_entry()) {
// used, prepend <java.home>/modules/modules_name to the system boot class path.
if (loader == NULL && !ClassLoader::has_jrt_entry()) {
ClassLoader::add_to_exploded_build_list(module_symbol, CHECK);
}
}