< prev index next >

src/hotspot/share/classfile/classLoader.hpp

Print this page

        

@@ -24,10 +24,11 @@
 
 #ifndef SHARE_CLASSFILE_CLASSLOADER_HPP
 #define SHARE_CLASSFILE_CLASSLOADER_HPP
 
 #include "jimage.hpp"
+#include "runtime/arguments.hpp"
 #include "runtime/handles.hpp"
 #include "runtime/perfData.hpp"
 #include "utilities/exceptions.hpp"
 #include "utilities/macros.hpp"
 

@@ -393,12 +394,11 @@
   static int num_app_classpath_entries();
 
   // 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,
-           "Should only be called at CDS dump time");
+    Arguments::assert_is_dumping_archive();
     int num_entries = 0;
     ClassPathEntry* e= ClassLoader::_module_path_entries;
     while (e != NULL) {
       num_entries ++;
       e = e->next();
< prev index next >