< prev index next >

src/hotspot/share/classfile/sharedPathsMiscInfo.cpp

Print this page

        

@@ -155,18 +155,20 @@
 char* skip_first_path_entry(const char* path) {
   size_t path_sep_len = strlen(os::path_separator());
   char* p = strstr((char*)path, os::path_separator());
   if (p != NULL) {
     debug_only( {
-      size_t image_name_len = strlen(MODULES_IMAGE_NAME);
-      assert(strncmp(p - image_name_len, MODULES_IMAGE_NAME, image_name_len) == 0,
+      const char* image_name = ClassLoader::modules_image_name();
+      assert(image_name != NULL, "modules image name must not be NULL");
+      size_t image_name_len = strlen(image_name);
+      assert(strncmp(p - image_name_len, image_name, image_name_len) == 0,
              "first entry must be the modules image");
     } );
     p += path_sep_len;
   } else {
     debug_only( {
-      assert(ClassLoader::string_ends_with(path, MODULES_IMAGE_NAME),
+      assert(ClassLoader::is_modules_image(path),
              "first entry must be the modules image");
     } );
   }
   return p;
 }
< prev index next >