Skip to content
Permalink
Browse files
8273451: Remove unreachable return in mutexLocker::wait
Reviewed-by: minqi, coleenp
  • Loading branch information
lmesnik committed Sep 8, 2021
1 parent e680503 commit 9b5991e811b789fe8b60701657c2f0dd2c222c2e
Showing 1 changed file with 2 additions and 6 deletions.
@@ -255,12 +255,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 9b5991e

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 9b5991e Sep 8, 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.