jdk/test/javax/management/monitor/StringMonitorDeadlockTest.java
changeset 31674 d60ab1cd78ae
parent 30376 2ccf2cf7ea48
child 31907 cafb1bf49cfb
--- 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();