The pattern:
MutexLocker ml(x_lock);
x_lock->wait();
Should be replaced with:
MonitorLocker ml(x_lock);
ml.wait();
Then the wait call wouldn't have to differentiate whether it needs a safepoint check based on the way the lock was acquired in the MutexLocker constructors. Also, it would prevent using the wrong lock in the wait.
The one MonitorLocker that is NULL should be made non-null and NULL MonitorLocker should be disallowed.
MutexLocker ml(x_lock);
x_lock->wait();
Should be replaced with:
MonitorLocker ml(x_lock);
ml.wait();
Then the wait call wouldn't have to differentiate whether it needs a safepoint check based on the way the lock was acquired in the MutexLocker constructors. Also, it would prevent using the wrong lock in the wait.
The one MonitorLocker that is NULL should be made non-null and NULL MonitorLocker should be disallowed.
- relates to
-
JDK-8222821 com/sun/jdi/ExceptionEvents.java failed
- Resolved