--- a/src/hotspot/share/classfile/classLoader.inline.hpp Wed Oct 02 13:57:03 2019 -0400
+++ b/src/hotspot/share/classfile/classLoader.inline.hpp Wed Oct 02 16:55:08 2019 -0700
@@ -62,8 +62,7 @@
// entries during shared classpath setup time.
inline int ClassLoader::num_boot_classpath_entries() {
- assert(DumpSharedSpaces || DynamicDumpSharedSpaces,
- "Should only be called at CDS dump time");
+ Arguments::assert_is_dumping_archive();
assert(has_jrt_entry(), "must have a java runtime image");
int num_entries = 1; // count the runtime image
ClassPathEntry* e = ClassLoader::_first_append_entry;
@@ -85,8 +84,7 @@
// Helper function used by CDS code to get the number of app classpath
// entries during shared classpath setup time.
inline int ClassLoader::num_app_classpath_entries() {
- assert(DumpSharedSpaces || DynamicDumpSharedSpaces,
- "Should only be called at CDS dump time");
+ Arguments::assert_is_dumping_archive();
int num_entries = 0;
ClassPathEntry* e= ClassLoader::_app_classpath_entries;
while (e != NULL) {