diff -r 135283550686 -r d60ab1cd78ae jdk/test/javax/management/monitor/StringMonitorDeadlockTest.java --- a/jdk/test/javax/management/monitor/StringMonitorDeadlockTest.java Thu Jun 25 18:24:39 2015 +0200 +++ b/jdk/test/javax/management/monitor/StringMonitorDeadlockTest.java Thu Jun 25 11:18:04 2015 +0200 @@ -38,7 +38,6 @@ import java.lang.management.ManagementFactory; import java.util.concurrent.atomic.AtomicInteger; -import javax.management.Attribute; import javax.management.JMX; import javax.management.MBeanServer; import javax.management.Notification; @@ -96,9 +95,10 @@ monitorProxy.setStringToCompare("old"); monitorProxy.setGranularityPeriod(10L); // 10 ms monitorProxy.setNotifyDiffer(true); + + final int initGetCount = observedProxy.getGetCount(); monitorProxy.start(); - final int initGetCount = observedProxy.getGetCount(); int getCount = initGetCount; for (int i = 0; i < 500; i++) { // 500 * 10 = 5 seconds getCount = observedProxy.getGetCount();