jdk/src/share/classes/javax/management/openmbean/OpenMBeanAttributeInfoSupport.java
changeset 1510 e747d3193ef2
parent 715 f16baef3a20e
child 3446 4a07252d2e92
--- a/jdk/src/share/classes/javax/management/openmbean/OpenMBeanAttributeInfoSupport.java	Fri Oct 24 20:47:23 2008 -0700
+++ b/jdk/src/share/classes/javax/management/openmbean/OpenMBeanAttributeInfoSupport.java	Mon Oct 27 14:02:40 2008 +0100
@@ -78,12 +78,12 @@
     /**
      * @serial The open mbean attribute's min value
      */
-    private final Comparable minValue;
+    private final Comparable<?> minValue;
 
     /**
      * @serial The open mbean attribute's max value
      */
-    private final Comparable maxValue;
+    private final Comparable<?> maxValue;
 
 
     // As this instance is immutable, these two values need only
@@ -450,7 +450,7 @@
     }
 
     static void check(OpenMBeanParameterInfo info) throws OpenDataException {
-        OpenType openType = info.getOpenType();
+        OpenType<?> openType = info.getOpenType();
         if (openType == null)
             throw new IllegalArgumentException("OpenType cannot be null");
 
@@ -562,7 +562,7 @@
 
     }
 
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings({"unchecked", "rawtypes"})
     static int compare(Object x, Object y) {
         return ((Comparable) x).compareTo(y);
     }
@@ -657,11 +657,11 @@
         return result;
     }
 
-    static <T> Comparable comparableValueFrom(Descriptor d, String name,
-                                              OpenType<T> openType) {
+    static <T> Comparable<?> comparableValueFrom(Descriptor d, String name,
+                                                 OpenType<T> openType) {
         T t = valueFrom(d, name, openType);
         if (t == null || t instanceof Comparable<?>)
-            return (Comparable) t;
+            return (Comparable<?>) t;
         final String msg =
             "Descriptor field " + name + " with value " + t +
             " is not Comparable";
@@ -925,7 +925,7 @@
         return isValue(this, obj);
     }
 
-    @SuppressWarnings("unchecked")  // cast to Comparable
+    @SuppressWarnings({"unchecked", "rawtypes"})  // cast to Comparable
     static boolean isValue(OpenMBeanParameterInfo info, Object obj) {
         if (info.hasDefaultValue() && obj == null)
             return true;