6687508: Update test/sun/management jtreg tests due to sun.management.ManagementFactory class rename
Summary: Modified the jtreg tests to use ManagementFactoryHelper instead
Reviewed-by: emcmanus
--- a/jdk/test/sun/management/HotspotClassLoadingMBean/GetClassInitializationTime.java Thu Apr 10 16:11:27 2008 -0700
+++ b/jdk/test/sun/management/HotspotClassLoadingMBean/GetClassInitializationTime.java Fri Apr 11 10:26:26 2008 -0700
@@ -37,7 +37,7 @@
public class GetClassInitializationTime {
private static HotspotClassLoadingMBean mbean =
- (HotspotClassLoadingMBean)ManagementFactory.getHotspotClassLoadingMBean();
+ (HotspotClassLoadingMBean)ManagementFactoryHelper.getHotspotClassLoadingMBean();
// Careful with these values.
private static final long MIN_TIME_FOR_PASS = 1;
--- a/jdk/test/sun/management/HotspotClassLoadingMBean/GetClassLoadingTime.java Thu Apr 10 16:11:27 2008 -0700
+++ b/jdk/test/sun/management/HotspotClassLoadingMBean/GetClassLoadingTime.java Fri Apr 11 10:26:26 2008 -0700
@@ -39,7 +39,7 @@
public class GetClassLoadingTime {
private static HotspotClassLoadingMBean mbean =
- (HotspotClassLoadingMBean)ManagementFactory.getHotspotClassLoadingMBean();
+ (HotspotClassLoadingMBean)ManagementFactoryHelper.getHotspotClassLoadingMBean();
// Careful with these values.
private static final long MIN_TIME_FOR_PASS = 1;
--- a/jdk/test/sun/management/HotspotClassLoadingMBean/GetInitializedClassCount.java Thu Apr 10 16:11:27 2008 -0700
+++ b/jdk/test/sun/management/HotspotClassLoadingMBean/GetInitializedClassCount.java Fri Apr 11 10:26:26 2008 -0700
@@ -37,7 +37,7 @@
public class GetInitializedClassCount {
private static HotspotClassLoadingMBean mbean =
- (HotspotClassLoadingMBean)ManagementFactory.getHotspotClassLoadingMBean();
+ (HotspotClassLoadingMBean)ManagementFactoryHelper.getHotspotClassLoadingMBean();
// Careful with these values.
private static final long MIN_VALUE_FOR_PASS = 1;
--- a/jdk/test/sun/management/HotspotClassLoadingMBean/GetLoadedClassSize.java Thu Apr 10 16:11:27 2008 -0700
+++ b/jdk/test/sun/management/HotspotClassLoadingMBean/GetLoadedClassSize.java Fri Apr 11 10:26:26 2008 -0700
@@ -37,7 +37,7 @@
public class GetLoadedClassSize {
private static HotspotClassLoadingMBean mbean =
- (HotspotClassLoadingMBean)ManagementFactory.getHotspotClassLoadingMBean();
+ (HotspotClassLoadingMBean)ManagementFactoryHelper.getHotspotClassLoadingMBean();
// Careful with these values.
private static final long MIN_VALUE_FOR_PASS = 1;
--- a/jdk/test/sun/management/HotspotClassLoadingMBean/GetMethodDataSize.java Thu Apr 10 16:11:27 2008 -0700
+++ b/jdk/test/sun/management/HotspotClassLoadingMBean/GetMethodDataSize.java Fri Apr 11 10:26:26 2008 -0700
@@ -37,7 +37,7 @@
public class GetMethodDataSize {
private static HotspotClassLoadingMBean mbean =
- (HotspotClassLoadingMBean)ManagementFactory.getHotspotClassLoadingMBean();
+ (HotspotClassLoadingMBean)ManagementFactoryHelper.getHotspotClassLoadingMBean();
// Careful with these values.
private static final long MIN_VALUE_FOR_PASS = 1;
--- a/jdk/test/sun/management/HotspotClassLoadingMBean/GetUnloadedClassSize.java Thu Apr 10 16:11:27 2008 -0700
+++ b/jdk/test/sun/management/HotspotClassLoadingMBean/GetUnloadedClassSize.java Fri Apr 11 10:26:26 2008 -0700
@@ -37,7 +37,7 @@
public class GetUnloadedClassSize {
private static HotspotClassLoadingMBean mbean =
- (HotspotClassLoadingMBean)ManagementFactory.getHotspotClassLoadingMBean();
+ (HotspotClassLoadingMBean)ManagementFactoryHelper.getHotspotClassLoadingMBean();
// Careful with these values.
private static final long MIN_VALUE_FOR_PASS = 0;
--- a/jdk/test/sun/management/HotspotRuntimeMBean/GetSafepointCount.java Thu Apr 10 16:11:27 2008 -0700
+++ b/jdk/test/sun/management/HotspotRuntimeMBean/GetSafepointCount.java Fri Apr 11 10:26:26 2008 -0700
@@ -37,7 +37,7 @@
public class GetSafepointCount {
private static HotspotRuntimeMBean mbean =
- (HotspotRuntimeMBean)ManagementFactory.getHotspotRuntimeMBean();
+ (HotspotRuntimeMBean)ManagementFactoryHelper.getHotspotRuntimeMBean();
private static final long NUM_THREAD_DUMPS = 5;
--- a/jdk/test/sun/management/HotspotRuntimeMBean/GetSafepointSyncTime.java Thu Apr 10 16:11:27 2008 -0700
+++ b/jdk/test/sun/management/HotspotRuntimeMBean/GetSafepointSyncTime.java Fri Apr 11 10:26:26 2008 -0700
@@ -37,7 +37,7 @@
public class GetSafepointSyncTime {
private static HotspotRuntimeMBean mbean =
- (HotspotRuntimeMBean)ManagementFactory.getHotspotRuntimeMBean();
+ (HotspotRuntimeMBean)ManagementFactoryHelper.getHotspotRuntimeMBean();
private static final long NUM_THREAD_DUMPS = 300;
--- a/jdk/test/sun/management/HotspotRuntimeMBean/GetTotalSafepointTime.java Thu Apr 10 16:11:27 2008 -0700
+++ b/jdk/test/sun/management/HotspotRuntimeMBean/GetTotalSafepointTime.java Fri Apr 11 10:26:26 2008 -0700
@@ -37,7 +37,7 @@
public class GetTotalSafepointTime {
private static HotspotRuntimeMBean mbean =
- (HotspotRuntimeMBean)ManagementFactory.getHotspotRuntimeMBean();
+ (HotspotRuntimeMBean)ManagementFactoryHelper.getHotspotRuntimeMBean();
private static final long NUM_THREAD_DUMPS = 100;
--- a/jdk/test/sun/management/HotspotThreadMBean/GetInternalThreads.java Thu Apr 10 16:11:27 2008 -0700
+++ b/jdk/test/sun/management/HotspotThreadMBean/GetInternalThreads.java Fri Apr 11 10:26:26 2008 -0700
@@ -32,10 +32,11 @@
import sun.management.*;
import java.util.*;
import java.lang.management.ThreadMXBean;
+import java.lang.management.ManagementFactory;
public class GetInternalThreads {
private static HotspotThreadMBean mbean =
- ManagementFactory.getHotspotThreadMBean();
+ ManagementFactoryHelper.getHotspotThreadMBean();
// Minimum number of VM internal threads
// VM thread, watcher thread, Low memory detector, compiler thread
@@ -55,7 +56,7 @@
System.out.println("Internal Thread Count = " + value);
ThreadMXBean thread =
- java.lang.management.ManagementFactory.getThreadMXBean();
+ ManagementFactory.getThreadMXBean();
if (!thread.isThreadCpuTimeSupported()) {
System.out.println("Thread Cpu Time is not supported.");
return;