8273451: Remove unreachable return in mutexLocker::wait

Reviewed-by: minqi, coleenp
This commit is contained in:
Leonid Mesnik 2021-09-08 19:30:17 +00:00
parent e6805032ff
commit 9b5991e811

View file

@ -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() {