7117585: Eliminate java.lang.instrument, java.lang.management warnings
Reviewed-by: mchung
diff --git a/jdk/src/share/classes/java/lang/instrument/ClassDefinition.java b/jdk/src/share/classes/java/lang/instrument/ClassDefinition.java
index db925e6..aa02609 100644
--- a/jdk/src/share/classes/java/lang/instrument/ClassDefinition.java
+++ b/jdk/src/share/classes/java/lang/instrument/ClassDefinition.java
@@ -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
diff --git a/jdk/src/share/classes/java/lang/management/ManagementFactory.java b/jdk/src/share/classes/java/lang/management/ManagementFactory.java
index 695bc37..98f2e40 100644
--- a/jdk/src/share/classes/java/lang/management/ManagementFactory.java
+++ b/jdk/src/share/classes/java/lang/management/ManagementFactory.java
@@ -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 =
diff --git a/jdk/src/share/classes/java/lang/management/PlatformComponent.java b/jdk/src/share/classes/java/lang/management/PlatformComponent.java
index 82b6e87..d924335 100644
--- a/jdk/src/share/classes/java/lang/management/PlatformComponent.java
+++ b/jdk/src/share/classes/java/lang/management/PlatformComponent.java
@@ -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);
}