8187436: -Xbootclasspath/a causes sanity check assertion with exploded build

Fixed asserts to work properly with exploded build

Reviewed-by: alanb, jiangli, gtriantafill
This commit is contained in:
Harold Seigel 2017-09-26 08:58:04 -04:00
parent 070104325c
commit 2781cf9c38
2 changed files with 61 additions and 1 deletions

View file

@ -403,7 +403,8 @@ class ClassLoader: AllStatic {
static int compute_Object_vtable();
static ClassPathEntry* classpath_entry(int n) {
assert(n >= 0 && n < _num_entries, "sanity");
assert(n >= 0, "sanity");
assert(!has_jrt_entry() || n < _num_entries, "sanity");
if (n == 0) {
assert(has_jrt_entry(), "No class path entry at 0 for exploded module builds");
return ClassLoader::_jrt_entry;