--- old/test/compiler/testlibrary/rtm/BusyLock.java 2015-04-28 16:18:51.818034850 +0300 +++ new/test/compiler/testlibrary/rtm/BusyLock.java 2015-04-28 16:18:51.734034853 +0300 @@ -77,7 +77,7 @@ } } - public void test() { + public void syncAndTest() { try { barrier.await(); // wait until monitor is locked by a ::run method @@ -85,6 +85,10 @@ } catch (InterruptedException | BrokenBarrierException e) { throw new RuntimeException("Synchronization error happened.", e); } + test(); + } + + public void test() { synchronized(monitor) { BusyLock.field++; } @@ -130,7 +134,7 @@ Thread t = new Thread(busyLock); t.start(); - busyLock.test(); + busyLock.syncAndTest(); t.join(); } }