Skip to content
Permalink
Browse files
8273451: Remove unreachable return in mutexLocker::wait
Backport-of: 9b5991e811b789fe8b60701657c2f0dd2c222c2e
  • Loading branch information
Olga Mikhaltsova authored and Yuri Nesterenko committed Sep 27, 2021
1 parent 227e159 commit 00f7c45a4cc073519c0009c0daa51373f8227895
Showing 1 changed file with 2 additions and 6 deletions.
@@ -260,12 +260,8 @@ class MonitorLocker: public MutexLocker {
}

bool wait(int64_t timeout = 0) {
if (_flag == Mutex::_safepoint_check_flag) {
return as_monitor()->wait(timeout);
} else {
return as_monitor()->wait_without_safepoint_check(timeout);
}
return false;
return _flag == Mutex::_safepoint_check_flag ?
as_monitor()->wait(timeout) : as_monitor()->wait_without_safepoint_check(timeout);
}

void notify_all() {

1 comment on commit 00f7c45

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 00f7c45 Sep 27, 2021

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.