changeset 4816:98502d7a3f98

7117585: Eliminate java.lang.instrument, java.lang.management warnings Reviewed-by: mchung Contributed-by: Jon VanAlten <jon.vanalten@redhat.com>
author mchung
date Fri, 02 Dec 2011 16:29:19 -0800
parents 1d7037df65ed
children 3c524deb8431
files src/share/classes/java/lang/instrument/ClassDefinition.java src/share/classes/java/lang/management/ManagementFactory.java src/share/classes/java/lang/management/PlatformComponent.java
diffstat 3 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/lang/instrument/ClassDefinition.java	Fri Dec 02 16:25:35 2011 -0800
+++ b/src/share/classes/java/lang/instrument/ClassDefinition.java	Fri Dec 02 16:29:19 2011 -0800
@@ -40,12 +40,12 @@
     /**
      *  The class to redefine
      */
-    private final   Class   mClass;
+    private final Class<?> mClass;
 
     /**
      *  The replacement class file bytes
      */
-    private final   byte[]  mClassFile;
+    private final byte[]   mClassFile;
 
     /**
      *  Creates a new <code>ClassDefinition</code> binding using the supplied
--- a/src/share/classes/java/lang/management/ManagementFactory.java	Fri Dec 02 16:25:35 2011 -0800
+++ b/src/share/classes/java/lang/management/ManagementFactory.java	Fri Dec 02 16:29:19 2011 -0800
@@ -576,7 +576,7 @@
                                Class<T> mxbeanInterface)
             throws java.io.IOException {
 
-        final Class interfaceClass = mxbeanInterface;
+        final Class<?> interfaceClass = mxbeanInterface;
         // Only allow MXBean interfaces from rt.jar loaded by the
         // bootstrap class loader
         final ClassLoader loader =
--- a/src/share/classes/java/lang/management/PlatformComponent.java	Fri Dec 02 16:25:35 2011 -0800
+++ b/src/share/classes/java/lang/management/PlatformComponent.java	Fri Dec 02 16:29:19 2011 -0800
@@ -314,7 +314,7 @@
     private final String domain;
     private final String type;
     private final Set<String> keyProperties;
-    private final MXBeanFetcher fetcher;
+    private final MXBeanFetcher<?> fetcher;
     private final PlatformComponent[] subComponents;
     private final boolean singleton;
 
@@ -322,7 +322,7 @@
                               String domain, String type,
                               Set<String> keyProperties,
                               boolean singleton,
-                              MXBeanFetcher fetcher,
+                              MXBeanFetcher<?> fetcher,
                               PlatformComponent... subComponents) {
         this.mxbeanInterfaceName = intfName;
         this.domain = domain;
@@ -373,7 +373,7 @@
     <T extends PlatformManagedObject>
         List<T> getMXBeans(Class<T> mxbeanInterface)
     {
-        return fetcher.getMXBeans();
+        return (List<T>) fetcher.getMXBeans();
     }
 
     <T extends PlatformManagedObject> T getSingletonMXBean(Class<T> mxbeanInterface)
@@ -382,7 +382,7 @@
             throw new IllegalArgumentException(mxbeanInterfaceName +
                 " can have zero or more than one instances");
 
-        List<T> list = fetcher.getMXBeans();
+        List<T> list = getMXBeans(mxbeanInterface);
         assert list.size() == 1;
         return list.isEmpty() ? null : list.get(0);
     }