--- old/src/hotspot/share/classfile/classLoader.hpp 2019-10-01 15:26:38.950032483 -0700 +++ new/src/hotspot/share/classfile/classLoader.hpp 2019-10-01 15:26:38.424012883 -0700 @@ -26,6 +26,7 @@ #define SHARE_CLASSFILE_CLASSLOADER_HPP #include "jimage.hpp" +#include "runtime/arguments.hpp" #include "runtime/handles.hpp" #include "runtime/perfData.hpp" #include "utilities/exceptions.hpp" @@ -395,7 +396,7 @@ // Helper function used by CDS code to get the number of module path // entries during shared classpath setup time. static int num_module_path_entries() { - assert(DumpSharedSpaces || DynamicDumpSharedSpaces, + assert(Arguments::is_dumping_archive(), "Should only be called at CDS dump time"); int num_entries = 0; ClassPathEntry* e= ClassLoader::_module_path_entries;