Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8267553: Extra JavaThread assignment in ClassLoader::create_class_path_entry() #4160

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/hotspot/share/classfile/classLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -722,18 +722,17 @@ ClassPathEntry* ClassLoader::create_class_path_entry(JavaThread* current,
const char *path, const struct stat* st,
bool is_boot_append,
bool from_class_path_attr) {
JavaThread* thread = current->as_Java_thread();
ClassPathEntry* new_entry = NULL;
if ((st->st_mode & S_IFMT) == S_IFREG) {
ResourceMark rm(thread);
ResourceMark rm(current);
// Regular file, should be a zip file
// Canonicalized filename
const char* canonical_path = get_canonical_path(path, thread);
const char* canonical_path = get_canonical_path(path, current);
if (canonical_path == NULL) {
return NULL;
}
char* error_msg = NULL;
jzfile* zip = open_zip_file(canonical_path, &error_msg, thread);
jzfile* zip = open_zip_file(canonical_path, &error_msg, current);
if (zip != NULL && error_msg == NULL) {
new_entry = new ClassPathZipEntry(zip, path, is_boot_append, from_class_path_attr);
} else {
Expand Down