changeset 180:18eed13fe9f6

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
author mchung
date Fri, 11 Apr 2008 10:26:26 -0700
parents bcf689d26c1c
children dd212ba9a0c6
files test/sun/management/HotspotClassLoadingMBean/GetClassInitializationTime.java test/sun/management/HotspotClassLoadingMBean/GetClassLoadingTime.java test/sun/management/HotspotClassLoadingMBean/GetInitializedClassCount.java test/sun/management/HotspotClassLoadingMBean/GetLoadedClassSize.java test/sun/management/HotspotClassLoadingMBean/GetMethodDataSize.java test/sun/management/HotspotClassLoadingMBean/GetUnloadedClassSize.java test/sun/management/HotspotRuntimeMBean/GetSafepointCount.java test/sun/management/HotspotRuntimeMBean/GetSafepointSyncTime.java test/sun/management/HotspotRuntimeMBean/GetTotalSafepointTime.java test/sun/management/HotspotThreadMBean/GetInternalThreads.java
diffstat 10 files changed, 12 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/test/sun/management/HotspotClassLoadingMBean/GetClassInitializationTime.java	Thu Apr 10 16:11:27 2008 -0700
+++ b/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/test/sun/management/HotspotClassLoadingMBean/GetClassLoadingTime.java	Thu Apr 10 16:11:27 2008 -0700
+++ b/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/test/sun/management/HotspotClassLoadingMBean/GetInitializedClassCount.java	Thu Apr 10 16:11:27 2008 -0700
+++ b/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/test/sun/management/HotspotClassLoadingMBean/GetLoadedClassSize.java	Thu Apr 10 16:11:27 2008 -0700
+++ b/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/test/sun/management/HotspotClassLoadingMBean/GetMethodDataSize.java	Thu Apr 10 16:11:27 2008 -0700
+++ b/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/test/sun/management/HotspotClassLoadingMBean/GetUnloadedClassSize.java	Thu Apr 10 16:11:27 2008 -0700
+++ b/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/test/sun/management/HotspotRuntimeMBean/GetSafepointCount.java	Thu Apr 10 16:11:27 2008 -0700
+++ b/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/test/sun/management/HotspotRuntimeMBean/GetSafepointSyncTime.java	Thu Apr 10 16:11:27 2008 -0700
+++ b/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/test/sun/management/HotspotRuntimeMBean/GetTotalSafepointTime.java	Thu Apr 10 16:11:27 2008 -0700
+++ b/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/test/sun/management/HotspotThreadMBean/GetInternalThreads.java	Thu Apr 10 16:11:27 2008 -0700
+++ b/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;