Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8267553: Extra JavaThread assignment in ClassLoader::create_class_pat…
…h_entry()

Reviewed-by: ccheung
  • Loading branch information
David Holmes committed May 24, 2021
1 parent 4d26f22 commit 3113910
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/hotspot/share/classfile/classLoader.cpp
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

1 comment on commit 3113910

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.