--- a/hotspot/src/share/vm/classfile/classLoader.hpp Sat Jul 22 15:54:27 2017 -0400
+++ b/hotspot/src/share/vm/classfile/classLoader.hpp Wed Aug 02 18:06:38 2017 -0700
@@ -397,6 +397,7 @@
static int compute_Object_vtable();
static ClassPathEntry* classpath_entry(int n) {
+ assert(n >= 0 && 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;
@@ -415,6 +416,10 @@
}
}
+ static int number_of_classpath_entries() {
+ return _num_entries;
+ }
+
static bool is_in_patch_mod_entries(Symbol* module_name);
#if INCLUDE_CDS