--- old/test/hotspot/jtreg/vmTestbase/nsk/share/locks/MonitorLockingThread.java 2019-11-04 17:33:14.941228218 +0100 +++ new/test/hotspot/jtreg/vmTestbase/nsk/share/locks/MonitorLockingThread.java 2019-11-04 17:33:14.773226403 +0100 @@ -78,7 +78,7 @@ * should already occur) and then force MonitorLockingThread to release lock */ while (blockedThread.getState() != Thread.State.BLOCKED) - yield(); + Thread.yield(); lockingThread.releaseLock(); } @@ -98,7 +98,7 @@ synchronized (lockToHold) { holdsLock = true; while (isRunning) - yield(); + Thread.yield(); } holdsLock = false; } @@ -106,12 +106,12 @@ public void releaseLock() { isRunning = false; while (holdsLock) - yield(); + Thread.yield(); } public void acquireLock() { start(); while (!holdsLock) - yield(); + Thread.yield(); } }