--- old/src/hotspot/share/classfile/classLoader.cpp 2019-03-13 17:10:05.924871941 -0700 +++ new/src/hotspot/share/classfile/classLoader.cpp 2019-03-13 17:10:05.792867227 -0700 @@ -445,7 +445,8 @@ return new ClassFileStream((u1*)data, (int)size, _name, - ClassFileStream::verify); + ClassFileStream::verify, + true); // from_modules_image } return NULL; @@ -458,10 +459,6 @@ return ((*JImageFindResource)(jf, module_name, get_jimage_version_string(), file_name, &size)); } -bool ClassPathImageEntry::is_modules_image() const { - return ClassLoader::is_modules_image(name()); -} - #if INCLUDE_CDS void ClassLoader::exit_with_path_failure(const char* error, const char* message) { assert(DumpSharedSpaces, "only called at dump time"); @@ -1498,7 +1495,7 @@ } // for index 0 and the stream->source() is the modules image or has the jrt: protocol. // The class must be from the runtime modules image. - if (i == 0 && (is_modules_image(src) || string_starts_with(src, "jrt:"))) { + if (i == 0 && (stream->from_modules_image() || string_starts_with(src, "jrt:"))) { classpath_index = i; break; } @@ -1514,7 +1511,7 @@ // The shared path table is set up after module system initialization. // The path table contains no entry before that. Any classes loaded prior // to the setup of the shared path table must be from the modules image. - assert(is_modules_image(src), "stream must be from modules image"); + assert(stream->from_modules_image(), "stream must be from modules image"); assert(FileMapInfo::get_number_of_shared_paths() == 0, "shared path table must not have been setup"); classpath_index = 0; }