Skip to content
Permalink
Browse files
8240324: Improve is_boot_class_loader_data() by adding simple check
Check if cld is the null_cld before looking at the class loader oop

Reviewed-by: coleenp
  • Loading branch information
Harold Seigel committed Mar 3, 2020
1 parent 52cfd29 commit cf89ff7a4b542788e08c29fc84f3c83ccdd53ee5
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/hotspot/share/classfile/classLoaderData.inline.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -39,8 +39,8 @@ inline oop ClassLoaderData::class_loader() const {
}

inline bool ClassLoaderData::is_boot_class_loader_data() const {
return class_loader() == NULL;
}
return this == _the_null_class_loader_data || class_loader() == NULL;
}

inline ClassLoaderData* ClassLoaderData::class_loader_data_or_null(oop loader) {
if (loader == NULL) {

0 comments on commit cf89ff7

Please sign in to comment.