Skip to content

Commit 052f54b

Browse files
committed
is_null -> is_empty
1 parent 7a17c8e commit 052f54b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/hotspot/share/compiler/compileTask.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ CompileTask* CompileTask::select_for_compilation() {
181181
}
182182

183183
// Capture method holder by strong handle to avoid unloading during compilation.
184-
if (!_method_unload_blocker_weak.is_null()) {
184+
if (!_method_unload_blocker_weak.is_empty()) {
185185
assert(_method_unload_blocker_weak.peek() != nullptr, "Should not be cleared");
186186
assert(_method->method_holder()->is_loader_alive(), "Should be alive");
187187
assert(_method_unload_blocker_strong.is_empty(), "Should be empty");
@@ -190,7 +190,7 @@ CompileTask* CompileTask::select_for_compilation() {
190190

191191
// See if hot method holder is still alive. If so, capture it by strong handle.
192192
// If not, reset it to nullptr, so downstream logging code does not crash.
193-
if (!_hot_method_unload_blocker_weak.is_null()) {
193+
if (!_hot_method_unload_blocker_weak.is_empty()) {
194194
if (_hot_method_unload_blocker_weak.peek() != nullptr) {
195195
assert(_hot_method->method_holder()->is_loader_alive(), "Should be alive");
196196
assert(_hot_method_unload_blocker_strong.is_empty(), "Should be empty");
@@ -216,7 +216,7 @@ void CompileTask::mark_on_stack() {
216216

217217
bool CompileTask::is_unloaded() const {
218218
// Unloaded if weakly referenced blocker was set, but now had been cleared by GC.
219-
return !_method_unload_blocker_weak.is_null() && _method_unload_blocker_weak.peek() == nullptr;
219+
return !_method_unload_blocker_weak.is_empty() && _method_unload_blocker_weak.peek() == nullptr;
220220
}
221221

222222
// RedefineClasses support

0 commit comments

Comments
 (0)