7117570: Warnings in sun.mangement.* and its subpackages
authormchung
Tue, 17 Jan 2012 15:55:40 -0800
changeset 11530 a9d059c15b80
parent 11529 e08d565262ce
child 11531 b1f9f8d4806b
7117570: Warnings in sun.mangement.* and its subpackages Reviewed-by: mchung, dsamersoff Contributed-by: kurchi.subhra.hazra@oracle.com
jdk/src/share/classes/sun/management/Agent.java
jdk/src/share/classes/sun/management/ConnectorAddressLink.java
jdk/src/share/classes/sun/management/Flag.java
jdk/src/share/classes/sun/management/GarbageCollectionNotifInfoCompositeData.java
jdk/src/share/classes/sun/management/GarbageCollectorImpl.java
jdk/src/share/classes/sun/management/GcInfoBuilder.java
jdk/src/share/classes/sun/management/GcInfoCompositeData.java
jdk/src/share/classes/sun/management/HotSpotDiagnostic.java
jdk/src/share/classes/sun/management/HotspotCompilation.java
jdk/src/share/classes/sun/management/HotspotThread.java
jdk/src/share/classes/sun/management/LazyCompositeData.java
jdk/src/share/classes/sun/management/ManagementFactoryHelper.java
jdk/src/share/classes/sun/management/MappedMXBeanType.java
jdk/src/share/classes/sun/management/MonitorInfoCompositeData.java
jdk/src/share/classes/sun/management/NotificationEmitterSupport.java
jdk/src/share/classes/sun/management/RuntimeImpl.java
jdk/src/share/classes/sun/management/ThreadInfoCompositeData.java
jdk/src/share/classes/sun/management/counter/perf/PerfInstrumentation.java
jdk/src/share/classes/sun/management/jmxremote/ConnectorBootstrap.java
jdk/src/share/classes/sun/management/snmp/AdaptorBootstrap.java
jdk/src/share/classes/sun/management/snmp/jvminstr/JVM_MANAGEMENT_MIB_IMPL.java
jdk/src/share/classes/sun/management/snmp/jvminstr/JvmMemGCTableMetaImpl.java
jdk/src/share/classes/sun/management/snmp/jvminstr/JvmMemManagerTableMetaImpl.java
jdk/src/share/classes/sun/management/snmp/jvminstr/JvmMemMgrPoolRelTableMetaImpl.java
jdk/src/share/classes/sun/management/snmp/jvminstr/JvmMemPoolTableMetaImpl.java
jdk/src/share/classes/sun/management/snmp/jvminstr/JvmMemoryImpl.java
jdk/src/share/classes/sun/management/snmp/jvminstr/JvmMemoryMetaImpl.java
jdk/src/share/classes/sun/management/snmp/jvminstr/JvmOSImpl.java
jdk/src/share/classes/sun/management/snmp/jvminstr/JvmRTBootClassPathEntryImpl.java
jdk/src/share/classes/sun/management/snmp/jvminstr/JvmRTBootClassPathTableMetaImpl.java
jdk/src/share/classes/sun/management/snmp/jvminstr/JvmRTClassPathEntryImpl.java
jdk/src/share/classes/sun/management/snmp/jvminstr/JvmRTClassPathTableMetaImpl.java
jdk/src/share/classes/sun/management/snmp/jvminstr/JvmRTInputArgsEntryImpl.java
jdk/src/share/classes/sun/management/snmp/jvminstr/JvmRTInputArgsTableMetaImpl.java
jdk/src/share/classes/sun/management/snmp/jvminstr/JvmRTLibraryPathEntryImpl.java
jdk/src/share/classes/sun/management/snmp/jvminstr/JvmRTLibraryPathTableMetaImpl.java
jdk/src/share/classes/sun/management/snmp/jvminstr/JvmRuntimeMetaImpl.java
jdk/src/share/classes/sun/management/snmp/jvminstr/JvmThreadInstanceEntryImpl.java
jdk/src/share/classes/sun/management/snmp/jvminstr/JvmThreadInstanceTableMetaImpl.java
jdk/src/share/classes/sun/management/snmp/jvminstr/JvmThreadingMetaImpl.java
jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmClassesVerboseLevel.java
jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmJITCompilerTimeMonitoring.java
jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmMemManagerState.java
jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmMemPoolCollectThreshdSupport.java
jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmMemPoolState.java
jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmMemPoolThreshdSupport.java
jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmMemPoolType.java
jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmMemoryGCCall.java
jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmMemoryGCVerboseLevel.java
jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmRTBootClassPathSupport.java
jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmThreadContentionMonitoring.java
jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmThreadCpuTimeMonitoring.java
jdk/src/share/classes/sun/management/snmp/jvmmib/JVM_MANAGEMENT_MIB.java
jdk/src/share/classes/sun/management/snmp/jvmmib/JVM_MANAGEMENT_MIBOidTable.java
jdk/src/share/classes/sun/management/snmp/jvmmib/JvmClassLoadingMeta.java
jdk/src/share/classes/sun/management/snmp/jvmmib/JvmCompilationMeta.java
jdk/src/share/classes/sun/management/snmp/jvmmib/JvmMemGCEntryMeta.java
jdk/src/share/classes/sun/management/snmp/jvmmib/JvmMemGCTableMeta.java
jdk/src/share/classes/sun/management/snmp/jvmmib/JvmMemManagerEntryMeta.java
jdk/src/share/classes/sun/management/snmp/jvmmib/JvmMemManagerTableMeta.java
jdk/src/share/classes/sun/management/snmp/jvmmib/JvmMemMgrPoolRelEntryMeta.java
jdk/src/share/classes/sun/management/snmp/jvmmib/JvmMemMgrPoolRelTableMeta.java
jdk/src/share/classes/sun/management/snmp/jvmmib/JvmMemPoolEntryMeta.java
jdk/src/share/classes/sun/management/snmp/jvmmib/JvmMemPoolTableMeta.java
jdk/src/share/classes/sun/management/snmp/jvmmib/JvmOSMeta.java
jdk/src/share/classes/sun/management/snmp/jvmmib/JvmRTBootClassPathEntryMeta.java
jdk/src/share/classes/sun/management/snmp/jvmmib/JvmRTBootClassPathTableMeta.java
jdk/src/share/classes/sun/management/snmp/jvmmib/JvmRTClassPathEntryMeta.java
jdk/src/share/classes/sun/management/snmp/jvmmib/JvmRTClassPathTableMeta.java
jdk/src/share/classes/sun/management/snmp/jvmmib/JvmRTInputArgsEntryMeta.java
jdk/src/share/classes/sun/management/snmp/jvmmib/JvmRTInputArgsTableMeta.java
jdk/src/share/classes/sun/management/snmp/jvmmib/JvmRTLibraryPathEntryMeta.java
jdk/src/share/classes/sun/management/snmp/jvmmib/JvmRTLibraryPathTableMeta.java
jdk/src/share/classes/sun/management/snmp/jvmmib/JvmRuntimeMeta.java
jdk/src/share/classes/sun/management/snmp/jvmmib/JvmThreadInstanceEntryMeta.java
jdk/src/share/classes/sun/management/snmp/jvmmib/JvmThreadInstanceTableMeta.java
jdk/src/share/classes/sun/management/snmp/jvmmib/JvmThreadingMeta.java
jdk/src/share/classes/sun/management/snmp/util/MibLogger.java
jdk/src/share/classes/sun/management/snmp/util/SnmpListTableCache.java
jdk/src/share/classes/sun/management/snmp/util/SnmpNamedListTableCache.java
jdk/src/share/classes/sun/management/snmp/util/SnmpTableCache.java
--- a/jdk/src/share/classes/sun/management/Agent.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/Agent.java	Tue Jan 17 15:55:40 2012 -0800
@@ -216,11 +216,8 @@
                     adaptorClass.getMethod("initialize",
                         String.class, Properties.class);
             initializeMethod.invoke(null,snmpPort,props);
-        } catch (ClassNotFoundException x) {
-            // The SNMP packages are not present: throws an exception.
-            throw new UnsupportedOperationException("Unsupported management property: " + SNMP_PORT,x);
-        } catch (NoSuchMethodException x) {
-            // should not happen...
+        } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException x) {
+            // snmp runtime doesn't exist - initialization fails
             throw new UnsupportedOperationException("Unsupported management property: " + SNMP_PORT,x);
         } catch (InvocationTargetException x) {
             final Throwable cause = x.getCause();
@@ -230,9 +227,6 @@
                 throw (Error) cause;
             // should not happen...
             throw new UnsupportedOperationException("Unsupported management property: " + SNMP_PORT,cause);
-        } catch (IllegalAccessException x) {
-            // should not happen...
-            throw new UnsupportedOperationException("Unsupported management property: " + SNMP_PORT,x);
         }
     }
 
@@ -273,8 +267,8 @@
                 } catch (IOException e) {
                     error(CONFIG_FILE_CLOSE_FAILED, fname);
                 }
-            }
-        }
+             }
+         }
     }
 
     public static void startAgent() throws Exception {
@@ -309,7 +303,7 @@
                 // invoke the premain(String args) method
                 Class<?> clz = ClassLoader.getSystemClassLoader().loadClass(cname);
                 Method premain = clz.getMethod("premain",
-                                               new Class[] { String.class });
+                                               new Class<?>[] { String.class });
                 premain.invoke(null, /* static */
                                new Object[] { args });
             } catch (ClassNotFoundException ex) {
--- a/jdk/src/share/classes/sun/management/ConnectorAddressLink.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/ConnectorAddressLink.java	Tue Jan 17 15:55:40 2012 -0800
@@ -117,11 +117,11 @@
         } catch (IllegalArgumentException iae) {
             throw new IOException(iae.getMessage());
         }
-        List counters =
+        List<Counter> counters =
                 new PerfInstrumentation(bb).findByPattern(CONNECTOR_ADDRESS_COUNTER);
-        Iterator i = counters.iterator();
+        Iterator<Counter> i = counters.iterator();
         if (i.hasNext()) {
-            Counter c = (Counter) i.next();
+            Counter c = i.next();
             return (String) c.getValue();
         } else {
             return null;
@@ -167,13 +167,13 @@
         } catch (IllegalArgumentException iae) {
             throw new IOException(iae.getMessage());
         }
-        List counters = new PerfInstrumentation(bb).getAllCounters();
-        Map<String, String> properties = new HashMap<String, String>();
-        for (Object c : counters) {
-            String name = ((Counter) c).getName();
+        List<Counter> counters = new PerfInstrumentation(bb).getAllCounters();
+        Map<String, String> properties = new HashMap<>();
+        for (Counter c : counters) {
+            String name =  c.getName();
             if (name.startsWith(REMOTE_CONNECTOR_COUNTER_PREFIX) &&
                     !name.equals(CONNECTOR_ADDRESS_COUNTER)) {
-                properties.put(name, ((Counter) c).getValue().toString());
+                properties.put(name, c.getValue().toString());
             }
         }
         return properties;
--- a/jdk/src/share/classes/sun/management/Flag.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/Flag.java	Tue Jan 17 15:55:40 2012 -0800
@@ -91,7 +91,7 @@
         Flag[] flags = new Flag[numFlags];
         int count = getFlags(names, flags, numFlags);
 
-        List<Flag> result = new ArrayList<Flag>();
+        List<Flag> result = new ArrayList<>();
         for (Flag f : flags) {
             if (f != null) {
                 result.add(f);
--- a/jdk/src/share/classes/sun/management/GarbageCollectionNotifInfoCompositeData.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/GarbageCollectionNotifInfoCompositeData.java	Tue Jan 17 15:55:40 2012 -0800
@@ -69,11 +69,7 @@
                         Field f = cl.getDeclaredField("builder");
                         f.setAccessible(true);
                         return (GcInfoBuilder)f.get(gcNotifInfo.getGcInfo());
-                    } catch(ClassNotFoundException e) {
-                        return null;
-                    } catch(NoSuchFieldException e) {
-                        return null;
-                    } catch(IllegalAccessException e) {
+                    } catch(ClassNotFoundException | NoSuchFieldException | IllegalAccessException e) {
                         return null;
                     }
                 }
@@ -82,7 +78,7 @@
         synchronized(compositeTypeByBuilder) {
             gict = compositeTypeByBuilder.get(builder);
             if(gict == null) {
-                OpenType[] gcNotifInfoItemTypes = new OpenType[] {
+                OpenType<?>[] gcNotifInfoItemTypes = new OpenType<?>[] {
                     SimpleType.STRING,
                     SimpleType.STRING,
                     SimpleType.STRING,
@@ -141,7 +137,7 @@
         GC_INFO
     };
     private static HashMap<GcInfoBuilder,CompositeType> compositeTypeByBuilder =
-        new HashMap<GcInfoBuilder,CompositeType>();
+        new HashMap<>();
 
     public static String getGcName(CompositeData cd) {
         String gcname = getString(cd, GC_NAME);
@@ -195,7 +191,7 @@
     private static synchronized CompositeType getBaseGcNotifInfoCompositeType() {
         if (baseGcNotifInfoCompositeType == null) {
             try {
-                OpenType[] baseGcNotifInfoItemTypes = new OpenType[] {
+                OpenType<?>[] baseGcNotifInfoItemTypes = new OpenType<?>[] {
                     SimpleType.STRING,
                     SimpleType.STRING,
                     SimpleType.STRING,
--- a/jdk/src/share/classes/sun/management/GarbageCollectorImpl.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/GarbageCollectorImpl.java	Tue Jan 17 15:55:40 2012 -0800
@@ -70,14 +70,11 @@
     private String[] poolNames = null;
     synchronized String[] getAllPoolNames() {
         if (poolNames == null) {
-            List pools = ManagementFactory.getMemoryPoolMXBeans();
+            List<MemoryPoolMXBean> pools = ManagementFactory.getMemoryPoolMXBeans();
             poolNames = new String[pools.size()];
             int i = 0;
-            for (ListIterator iter = pools.listIterator();
-                 iter.hasNext();
-                 i++) {
-                MemoryPoolMXBean p = (MemoryPoolMXBean) iter.next();
-                poolNames[i] = p.getName();
+            for (MemoryPoolMXBean m : pools) {
+                poolNames[i++] = m.getName();
             }
         }
         return poolNames;
--- a/jdk/src/share/classes/sun/management/GcInfoBuilder.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/GcInfoBuilder.java	Tue Jan 17 15:55:40 2012 -0800
@@ -104,7 +104,7 @@
         int itemCount = numGcInfoItems + gcExtItemCount;
         allItemNames = new String[itemCount];
         String[] allItemDescs = new String[itemCount];
-        OpenType[] allItemTypes = new OpenType[itemCount];
+        OpenType<?>[] allItemTypes = new OpenType<?>[itemCount];
 
         System.arraycopy(gcInfoItemNames, 0, allItemNames, 0, numGcInfoItems);
         System.arraycopy(gcInfoItemNames, 0, allItemDescs, 0, numGcInfoItems);
--- a/jdk/src/share/classes/sun/management/GcInfoCompositeData.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/GcInfoCompositeData.java	Tue Jan 17 15:55:40 2012 -0800
@@ -76,11 +76,7 @@
                                 Field f = cl.getDeclaredField("builder");
                                 f.setAccessible(true);
                                 return (GcInfoBuilder)f.get(info);
-                            } catch(ClassNotFoundException e) {
-                                return null;
-                            } catch(NoSuchFieldException e) {
-                                return null;
-                            } catch(IllegalAccessException e) {
+                            } catch(ClassNotFoundException | NoSuchFieldException | IllegalAccessException e) {
                                 return null;
                             }
                         }
@@ -92,11 +88,7 @@
                                 Field f = cl.getDeclaredField("extAttributes");
                                 f.setAccessible(true);
                                 return (Object[])f.get(info);
-                            } catch(ClassNotFoundException e) {
-                                return null;
-                            } catch(NoSuchFieldException e) {
-                                return null;
-                            } catch(IllegalAccessException e) {
+                            } catch(ClassNotFoundException | NoSuchFieldException | IllegalAccessException e) {
                                 return null;
                             }
                         }
@@ -180,10 +172,7 @@
             Method m = GcInfo.class.getMethod("getMemoryUsageBeforeGc");
             memoryUsageMapType =
                 MappedMXBeanType.getMappedType(m.getGenericReturnType());
-        } catch (NoSuchMethodException e) {
-            // Should never reach here
-            throw new AssertionError(e);
-        } catch (OpenDataException e) {
+        } catch (NoSuchMethodException | OpenDataException e) {
             // Should never reach here
             throw new AssertionError(e);
         }
@@ -197,7 +186,7 @@
     static synchronized OpenType[] getBaseGcInfoItemTypes() {
         if (baseGcInfoItemTypes == null) {
             OpenType<?> memoryUsageOpenType = memoryUsageMapType.getOpenType();
-            baseGcInfoItemTypes = new OpenType[] {
+            baseGcInfoItemTypes = new OpenType<?>[] {
                 SimpleType.LONG,
                 SimpleType.LONG,
                 SimpleType.LONG,
@@ -225,10 +214,7 @@
         try {
             TabularData td = (TabularData) cd.get(MEMORY_USAGE_BEFORE_GC);
             return cast(memoryUsageMapType.toJavaTypeData(td));
-        } catch (InvalidObjectException e) {
-            // Should never reach here
-            throw new AssertionError(e);
-        } catch (OpenDataException e) {
+        } catch (InvalidObjectException | OpenDataException e) {
             // Should never reach here
             throw new AssertionError(e);
         }
@@ -244,10 +230,7 @@
             TabularData td = (TabularData) cd.get(MEMORY_USAGE_AFTER_GC);
             //return (Map<String,MemoryUsage>)
             return cast(memoryUsageMapType.toJavaTypeData(td));
-        } catch (InvalidObjectException e) {
-            // Should never reach here
-            throw new AssertionError(e);
-        } catch (OpenDataException e) {
+        } catch (InvalidObjectException | OpenDataException e) {
             // Should never reach here
             throw new AssertionError(e);
         }
--- a/jdk/src/share/classes/sun/management/HotSpotDiagnostic.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/HotSpotDiagnostic.java	Tue Jan 17 15:55:40 2012 -0800
@@ -48,7 +48,7 @@
 
     public List<VMOption> getDiagnosticOptions() {
         List<Flag> allFlags = Flag.getAllFlags();
-        List<VMOption> result = new ArrayList<VMOption>();
+        List<VMOption> result = new ArrayList<>();
         for (Flag flag : allFlags) {
             if (flag.isWriteable() && flag.isExternal()) {
                 result.add(flag.getVMOption());
--- a/jdk/src/share/classes/sun/management/HotspotCompilation.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/HotspotCompilation.java	Tue Jan 17 15:55:40 2012 -0800
@@ -120,13 +120,13 @@
         // current implementation.  We first look up in the SUN_CI namespace
         // since most counters are in SUN_CI namespace.
 
-        if ((c = (Counter) counters.get(SUN_CI + name)) != null) {
+        if ((c = counters.get(SUN_CI + name)) != null) {
             return c;
         }
-        if ((c = (Counter) counters.get(COM_SUN_CI + name)) != null) {
+        if ((c = counters.get(COM_SUN_CI + name)) != null) {
             return c;
         }
-        if ((c = (Counter) counters.get(JAVA_CI + name)) != null) {
+        if ((c = counters.get(JAVA_CI + name)) != null) {
             return c;
         }
 
@@ -136,10 +136,8 @@
 
     private void initCompilerCounters() {
         // Build a tree map of the current list of performance counters
-        ListIterator iter = getInternalCompilerCounters().listIterator();
-        counters = new TreeMap<String, Counter>();
-        while (iter.hasNext()) {
-            Counter c = (Counter) iter.next();
+        counters = new TreeMap<>();
+        for (Counter c: getInternalCompilerCounters()) {
             counters.put(c.getName(), c);
         }
 
@@ -200,7 +198,7 @@
     }
 
     public java.util.List<CompilerThreadStat> getCompilerThreadStats() {
-        List<CompilerThreadStat> list = new ArrayList<CompilerThreadStat>(threads.length);
+        List<CompilerThreadStat> list = new ArrayList<>(threads.length);
         int i = 0;
         if (threads[0] == null) {
             // no adaptor thread
--- a/jdk/src/share/classes/sun/management/HotspotThread.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/HotspotThread.java	Tue Jan 17 15:55:40 2012 -0800
@@ -58,7 +58,7 @@
         String[] names = new String[count];
         long[] times = new long[count];
         int numThreads = getInternalThreadTimes0(names, times);
-        Map<String, Long> result = new HashMap<String, Long>(numThreads);
+        Map<String, Long> result = new HashMap<>(numThreads);
         for (int i = 0; i < numThreads; i++) {
             result.put(names[i], new Long(times[i]));
         }
--- a/jdk/src/share/classes/sun/management/LazyCompositeData.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/LazyCompositeData.java	Tue Jan 17 15:55:40 2012 -0800
@@ -81,7 +81,7 @@
         return compositeData().toString();
     }
 
-    public Collection values() {
+    public Collection<?> values() {
         return compositeData().values();
     }
 
@@ -153,16 +153,15 @@
 
         // We can't use CompositeType.isValue() since it returns false
         // if the type name doesn't match.
-        Set allItems = type1.keySet();
+        Set<String> allItems = type1.keySet();
 
         // Check all items in the type1 exist in type2
         if (!type2.keySet().containsAll(allItems))
             return false;
 
-        for (Iterator iter = allItems.iterator(); iter.hasNext(); ) {
-            String item = (String) iter.next();
-            OpenType ot1 = type1.getType(item);
-            OpenType ot2 = type2.getType(item);
+        for (String item: allItems) {
+            OpenType<?> ot1 = type1.getType(item);
+            OpenType<?> ot2 = type2.getType(item);
             if (ot1 instanceof CompositeType) {
                 if (! (ot2 instanceof CompositeType))
                     return false;
@@ -183,8 +182,8 @@
     protected static boolean isTypeMatched(TabularType type1, TabularType type2) {
         if (type1 == type2) return true;
 
-        List list1 = type1.getIndexNames();
-        List list2 = type2.getIndexNames();
+        List<String> list1 = type1.getIndexNames();
+        List<String> list2 = type2.getIndexNames();
 
         // check if the list of index names are the same
         if (!list1.equals(list2))
--- a/jdk/src/share/classes/sun/management/ManagementFactoryHelper.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/ManagementFactoryHelper.java	Tue Jan 17 15:55:40 2012 -0800
@@ -110,7 +110,7 @@
 
     public static List<MemoryPoolMXBean> getMemoryPoolMXBeans() {
         MemoryPoolMXBean[] pools = MemoryImpl.getMemoryPools();
-        List<MemoryPoolMXBean> list = new ArrayList<MemoryPoolMXBean>(pools.length);
+        List<MemoryPoolMXBean> list = new ArrayList<>(pools.length);
         for (MemoryPoolMXBean p : pools) {
             list.add(p);
         }
@@ -119,7 +119,7 @@
 
     public static List<MemoryManagerMXBean> getMemoryManagerMXBeans() {
         MemoryManagerMXBean[]  mgrs = MemoryImpl.getMemoryManagers();
-        List<MemoryManagerMXBean> result = new ArrayList<MemoryManagerMXBean>(mgrs.length);
+        List<MemoryManagerMXBean> result = new ArrayList<>(mgrs.length);
         for (MemoryManagerMXBean m : mgrs) {
             result.add(m);
         }
@@ -128,7 +128,7 @@
 
     public static List<GarbageCollectorMXBean> getGarbageCollectorMXBeans() {
         MemoryManagerMXBean[]  mgrs = MemoryImpl.getMemoryManagers();
-        List<GarbageCollectorMXBean> result = new ArrayList<GarbageCollectorMXBean>(mgrs.length);
+        List<GarbageCollectorMXBean> result = new ArrayList<>(mgrs.length);
         for (MemoryManagerMXBean m : mgrs) {
             if (GarbageCollectorMXBean.class.isInstance(m)) {
                  result.add(GarbageCollectorMXBean.class.cast(m));
--- a/jdk/src/share/classes/sun/management/MappedMXBeanType.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/MappedMXBeanType.java	Tue Jan 17 15:55:40 2012 -0800
@@ -62,18 +62,18 @@
 @SuppressWarnings("unchecked")
 public abstract class MappedMXBeanType {
     private static final WeakHashMap<Type,MappedMXBeanType> convertedTypes =
-        new WeakHashMap<Type,MappedMXBeanType>();
+        new WeakHashMap<>();
 
     boolean  isBasicType = false;
-    OpenType openType = inProgress;
-    Class    mappedTypeClass;
+    OpenType<?> openType = inProgress;
+    Class<?>    mappedTypeClass;
 
     static synchronized MappedMXBeanType newMappedType(Type javaType)
             throws OpenDataException {
 
         MappedMXBeanType mt = null;
         if (javaType instanceof Class) {
-            final Class c = (Class) javaType;
+            final Class<?> c = (Class<?>) javaType;
             if (c.isEnum()) {
                 mt = new EnumMXBeanType(c);
             } else if (c.isArray()) {
@@ -85,7 +85,7 @@
             final ParameterizedType pt = (ParameterizedType) javaType;
             final Type rawType = pt.getRawType();
             if (rawType instanceof Class) {
-                final Class rc = (Class) rawType;
+                final Class<?> rc = (Class<?>) rawType;
                 if (rc == List.class) {
                     mt = new ListMXBeanType(pt);
                 } else if (rc == Map.class) {
@@ -106,7 +106,7 @@
     }
 
     // basic types do not require data mapping
-    static synchronized MappedMXBeanType newBasicType(Class c, OpenType ot)
+    static synchronized MappedMXBeanType newBasicType(Class<?> c, OpenType<?> ot)
             throws OpenDataException {
         MappedMXBeanType mt = new BasicMXBeanType(c, ot);
         convertedTypes.put(c, mt);
@@ -127,7 +127,7 @@
     }
 
     // Convert a class to an OpenType
-    public static synchronized OpenType toOpenType(Type t)
+    public static synchronized OpenType<?> toOpenType(Type t)
             throws OpenDataException {
         MappedMXBeanType mt = getMappedType(t);
         return mt.getOpenType();
@@ -152,7 +152,7 @@
     }
 
     // Return the mapped open type
-    OpenType getOpenType() {
+    OpenType<?> getOpenType() {
         return openType;
     }
 
@@ -168,7 +168,7 @@
     }
 
     // Return the mapped open type
-    Class getMappedTypeClass() {
+    Class<?> getMappedTypeClass() {
         return mappedTypeClass;
     }
 
@@ -192,8 +192,8 @@
     //   T <-> T (no conversion)
     //
     static class BasicMXBeanType extends MappedMXBeanType {
-        final Class basicType;
-        BasicMXBeanType(Class c, OpenType openType) {
+        final Class<?> basicType;
+        BasicMXBeanType(Class<?> c, OpenType<?> openType) {
             this.basicType = c;
             this.openType = openType;
             this.mappedTypeClass = c;
@@ -228,7 +228,7 @@
     //
     static class EnumMXBeanType extends MappedMXBeanType {
         final Class enumClass;
-        EnumMXBeanType(Class c) {
+        EnumMXBeanType(Class<?> c) {
             this.enumClass = c;
             this.openType = STRING;
             this.mappedTypeClass = String.class;
@@ -269,16 +269,16 @@
     //   E[] <-> openTypeData(E)[]
     //
     static class ArrayMXBeanType extends MappedMXBeanType {
-        final Class arrayClass;
+        final Class<?> arrayClass;
         protected MappedMXBeanType componentType;
         protected MappedMXBeanType baseElementType;
 
-        ArrayMXBeanType(Class c) throws OpenDataException {
+        ArrayMXBeanType(Class<?> c) throws OpenDataException {
             this.arrayClass = c;
             this.componentType = getMappedType(c.getComponentType());
 
             StringBuilder className = new StringBuilder();
-            Class et = c;
+            Class<?> et = c;
             int dim;
             for (dim = 0; et.isArray(); dim++) {
                 className.append('[');
@@ -299,7 +299,7 @@
                 throw ode;
             }
 
-            openType = new ArrayType(dim, baseElementType.getOpenType());
+            openType = new ArrayType<>(dim, baseElementType.getOpenType());
         }
 
         protected ArrayMXBeanType() {
@@ -395,7 +395,7 @@
                 throw ode;
             }
 
-            openType = new ArrayType(dim, baseElementType.getOpenType());
+            openType = new ArrayType<>(dim, baseElementType.getOpenType());
         }
 
         Type getJavaType() {
@@ -428,7 +428,7 @@
                 throw new OpenDataException("Element Type for " + pt +
                    " not supported");
             }
-            final Class et = (Class) argTypes[0];
+            final Class<?> et = (Class<?>) argTypes[0];
             if (et.isArray()) {
                 throw new OpenDataException("Element Type for " + pt +
                    " not supported");
@@ -445,7 +445,7 @@
                 ode.initCause(e);
                 throw ode;
             }
-            openType = new ArrayType(1, paramType.getOpenType());
+            openType = new ArrayType<>(1, paramType.getOpenType());
         }
 
         Type getJavaType() {
@@ -473,7 +473,7 @@
             throws OpenDataException, InvalidObjectException {
 
             final Object[] openArray = (Object[]) data;
-            List<Object> result = new ArrayList<Object>(openArray.length);
+            List<Object> result = new ArrayList<>(openArray.length);
             for (Object o : openArray) {
                 result.add(paramType.toJavaTypeData(o));
             }
@@ -514,7 +514,7 @@
             // FIXME: generate typeName for generic
             typeName = "Map<" + keyType.getName() + "," +
                                 valueType.getName() + ">";
-            final OpenType[] mapItemTypes = new OpenType[] {
+            final OpenType<?>[] mapItemTypes = new OpenType<?>[] {
                                                 keyType.getOpenType(),
                                                 valueType.getOpenType(),
                                             };
@@ -543,7 +543,7 @@
             final TabularData table = new TabularDataSupport(tabularType);
             final CompositeType rowType = tabularType.getRowType();
 
-            for (Map.Entry entry : map.entrySet()) {
+            for (Map.Entry<Object, Object> entry : map.entrySet()) {
                 final Object key = keyType.toOpenTypeData(entry.getKey());
                 final Object value = valueType.toOpenTypeData(entry.getValue());
                 final CompositeData row =
@@ -560,7 +560,7 @@
 
             final TabularData td = (TabularData) data;
 
-            Map<Object, Object> result = new HashMap<Object, Object>();
+            Map<Object, Object> result = new HashMap<>();
             for (CompositeData row : (Collection<CompositeData>) td.values()) {
                 Object key = keyType.toJavaTypeData(row.get(KEY));
                 Object value = valueType.toJavaTypeData(row.get(VALUE));
@@ -607,7 +607,7 @@
         final boolean isCompositeData;
         Method fromMethod = null;
 
-        CompositeDataMXBeanType(Class c) throws OpenDataException {
+        CompositeDataMXBeanType(Class<?> c) throws OpenDataException {
             this.javaClass = c;
             this.mappedTypeClass = COMPOSITE_DATA_CLASS;
 
@@ -639,8 +639,8 @@
                             return javaClass.getMethods();
                         }
                     });
-                final List<String> names = new ArrayList<String>();
-                final List<OpenType> types = new ArrayList<OpenType>();
+                final List<String> names = new ArrayList<>();
+                final List<OpenType<?>> types = new ArrayList<>();
 
                 /* Select public methods that look like "T getX()" or "boolean
                    isX()", where T is not void and X is not the empty
@@ -678,7 +678,7 @@
                                              c.getName(),
                                              nameArray, // field names
                                              nameArray, // field descriptions
-                                             types.toArray(new OpenType[0]));
+                                             types.toArray(new OpenType<?>[0]));
             }
         }
 
@@ -722,7 +722,7 @@
                 // so that no other classes are sent over the wire
                 CompositeData cd = (CompositeData) data;
                 CompositeType ct = cd.getCompositeType();
-                String[] itemNames = (String[]) ct.keySet().toArray(new String[0]);
+                String[] itemNames = ct.keySet().toArray(new String[0]);
                 Object[] itemValues = cd.getAll(itemNames);
                 return new CompositeDataSupport(ct, itemNames, itemValues);
             }
@@ -779,9 +779,9 @@
         }
         private static final long serialVersionUID = -3413063475064374490L;
     }
-    private static final OpenType inProgress;
+    private static final OpenType<?> inProgress;
     static {
-        OpenType t;
+        OpenType<?> t;
         try {
             t = new InProgress();
         } catch (OpenDataException e) {
@@ -799,8 +799,8 @@
     static {
         try {
             for (int i = 0; i < simpleTypes.length; i++) {
-                final OpenType t = simpleTypes[i];
-                Class c;
+                final OpenType<?> t = simpleTypes[i];
+                Class<?> c;
                 try {
                     c = Class.forName(t.getClassName(), false,
                                       String.class.getClassLoader());
@@ -816,7 +816,7 @@
                 if (c.getName().startsWith("java.lang.")) {
                     try {
                         final Field typeField = c.getField("TYPE");
-                        final Class primitiveType = (Class) typeField.get(null);
+                        final Class<?> primitiveType = (Class<?>) typeField.get(null);
                         MappedMXBeanType.newBasicType(primitiveType, t);
                     } catch (NoSuchFieldException e) {
                         // OK: must not be a primitive wrapper
--- a/jdk/src/share/classes/sun/management/MonitorInfoCompositeData.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/MonitorInfoCompositeData.java	Tue Jan 17 15:55:40 2012 -0800
@@ -92,7 +92,7 @@
             monitorInfoCompositeType = (CompositeType)
                 MappedMXBeanType.toOpenType(MonitorInfo.class);
             Set<String> s = monitorInfoCompositeType.keySet();
-            monitorInfoItemNames = (String[]) s.toArray(new String[0]);
+            monitorInfoItemNames =  s.toArray(new String[0]);
         } catch (OpenDataException e) {
             // Should never reach here
             throw new AssertionError(e);
--- a/jdk/src/share/classes/sun/management/NotificationEmitterSupport.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/NotificationEmitterSupport.java	Tue Jan 17 15:55:40 2012 -0800
@@ -71,7 +71,7 @@
            efficient solution would be to clone the listener list
            every time a notification is sent.  */
         synchronized (listenerLock) {
-            List<ListenerInfo> newList = new ArrayList<ListenerInfo>(listenerList.size() + 1);
+            List<ListenerInfo> newList = new ArrayList<>(listenerList.size() + 1);
             newList.addAll(listenerList);
             newList.add(new ListenerInfo(listener, filter, handback));
             listenerList = newList;
@@ -82,12 +82,12 @@
         throws ListenerNotFoundException {
 
         synchronized (listenerLock) {
-            List<ListenerInfo> newList = new ArrayList<ListenerInfo>(listenerList);
+            List<ListenerInfo> newList = new ArrayList<>(listenerList);
             /* We scan the list of listeners in reverse order because
                in forward order we would have to repeat the loop with
                the same index after a remove.  */
             for (int i=newList.size()-1; i>=0; i--) {
-                ListenerInfo li = (ListenerInfo)newList.get(i);
+                ListenerInfo li = newList.get(i);
 
                 if (li.listener == listener)
                     newList.remove(i);
@@ -106,10 +106,10 @@
         boolean found = false;
 
         synchronized (listenerLock) {
-            List<ListenerInfo> newList = new ArrayList<ListenerInfo>(listenerList);
+            List<ListenerInfo> newList = new ArrayList<>(listenerList);
             final int size = newList.size();
             for (int i = 0; i < size; i++) {
-                ListenerInfo li = (ListenerInfo) newList.get(i);
+                ListenerInfo li =  newList.get(i);
 
                 if (li.listener == listener) {
                     found = true;
@@ -148,7 +148,7 @@
 
         final int size = currentList.size();
         for (int i = 0; i < size; i++) {
-            ListenerInfo li = (ListenerInfo) currentList.get(i);
+            ListenerInfo li =  currentList.get(i);
 
             if (li.filter == null
                 || li.filter.isNotificationEnabled(notification)) {
--- a/jdk/src/share/classes/sun/management/RuntimeImpl.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/RuntimeImpl.java	Tue Jan 17 15:55:40 2012 -0800
@@ -128,7 +128,7 @@
 
     public Map<String,String> getSystemProperties() {
         Properties sysProps = System.getProperties();
-        Map<String,String> map = new HashMap<String, String>();
+        Map<String,String> map = new HashMap<>();
 
         // Properties.entrySet() does not include the entries in
         // the default properties.  So use Properties.stringPropertyNames()
--- a/jdk/src/share/classes/sun/management/ThreadInfoCompositeData.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/ThreadInfoCompositeData.java	Tue Jan 17 15:55:40 2012 -0800
@@ -190,7 +190,7 @@
                                       threadInfoV6Attributes.length;
             String[] v5ItemNames = new String[numV5Attributes];
             String[] v5ItemDescs = new String[numV5Attributes];
-            OpenType[] v5ItemTypes = new OpenType[numV5Attributes];
+            OpenType<?>[] v5ItemTypes = new OpenType<?>[numV5Attributes];
             int i = 0;
             for (String n : itemNames) {
                 if (isV5Attribute(n)) {
--- a/jdk/src/share/classes/sun/management/counter/perf/PerfInstrumentation.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/counter/perf/PerfInstrumentation.java	Tue Jan 17 15:55:40 2012 -0800
@@ -73,7 +73,7 @@
         buffer.position(prologue.getEntryOffset());
         nextEntry = buffer.position();
         // rebuild all the counters
-        map = new TreeMap<String, Counter>();
+        map = new TreeMap<>();
     }
 
     boolean hasNext() {
@@ -154,7 +154,7 @@
                 map.put(c.getName(), c);
             }
         }
-        return new ArrayList<Counter>(map.values());
+        return new ArrayList<>(map.values());
     }
 
     public synchronized List<Counter> findByPattern(String patternString) {
@@ -167,7 +167,8 @@
 
         Pattern pattern = Pattern.compile(patternString);
         Matcher matcher = pattern.matcher("");
-        List<Counter> matches = new ArrayList<Counter>();
+        List<Counter> matches = new ArrayList<>();
+
 
         for (Map.Entry<String,Counter> me: map.entrySet()) {
             String name = me.getKey();
--- a/jdk/src/share/classes/sun/management/jmxremote/ConnectorBootstrap.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/jmxremote/ConnectorBootstrap.java	Tue Jan 17 15:55:40 2012 -0800
@@ -234,14 +234,15 @@
                         "authenticated Subject is null");
             }
             final Set<Principal> principals = subject.getPrincipals();
-            for (Principal p: principals) {
-                if (properties.containsKey(p.getName())) {
+            for (Principal p1: principals) {
+                if (properties.containsKey(p1.getName())) {
                     return;
                 }
             }
-            final Set<String> principalsStr = new HashSet<String>();
-            for (Principal p: principals) {
-                principalsStr.add(p.getName());
+
+            final Set<String> principalsStr = new HashSet<>();
+            for (Principal p2: principals) {
+                principalsStr.add(p2.getName());
             }
             throw new SecurityException(
                     "Access denied! No entries found in the access file [" +
@@ -255,9 +256,9 @@
             if (fname == null) {
                 return p;
             }
-            FileInputStream fin = new FileInputStream(fname);
-            p.load(fin);
-            fin.close();
+            try (FileInputStream fin = new FileInputStream(fname)) {
+                p.load(fin);
+            }
             return p;
         }
         private final Map<String, Object> environment;
@@ -430,7 +431,7 @@
         try {
             // Export remote connector address and associated configuration
             // properties to the instrumentation buffer.
-            Map<String, String> properties = new HashMap<String, String>();
+            Map<String, String> properties = new HashMap<>();
             properties.put("remoteAddress", url.toString());
             properties.put("authenticate", useAuthenticationStr);
             properties.put("ssl", useSslStr);
@@ -456,7 +457,7 @@
         System.setProperty("java.rmi.server.randomIDs", "true");
 
         // This RMI server should not keep the VM alive
-        Map<String, Object> env = new HashMap<String, Object>();
+        Map<String, Object> env = new HashMap<>();
         env.put(RMIExporter.EXPORTER_ATTRIBUTE, new PermanentExporter());
 
         // The local connector server need only be available via the
@@ -599,12 +600,9 @@
             try {
                 // Load the SSL keystore properties from the config file
                 Properties p = new Properties();
-                InputStream in = new FileInputStream(sslConfigFileName);
-                try {
+                try (InputStream in = new FileInputStream(sslConfigFileName)) {
                     BufferedInputStream bin = new BufferedInputStream(in);
                     p.load(bin);
-                } finally {
-                    in.close();
                 }
                 String keyStore =
                         p.getProperty("javax.net.ssl.keyStore");
@@ -628,11 +626,8 @@
                 KeyStore ks = null;
                 if (keyStore != null) {
                     ks = KeyStore.getInstance(KeyStore.getDefaultType());
-                    FileInputStream ksfis = new FileInputStream(keyStore);
-                    try {
+                    try (FileInputStream ksfis = new FileInputStream(keyStore)) {
                         ks.load(ksfis, keyStorePasswd);
-                    } finally {
-                        ksfis.close();
                     }
                 }
                 KeyManagerFactory kmf = KeyManagerFactory.getInstance(
@@ -642,11 +637,8 @@
                 KeyStore ts = null;
                 if (trustStore != null) {
                     ts = KeyStore.getInstance(KeyStore.getDefaultType());
-                    FileInputStream tsfis = new FileInputStream(trustStore);
-                    try {
+                    try (FileInputStream tsfis = new FileInputStream(trustStore)) {
                         ts.load(tsfis, trustStorePasswd);
-                    } finally {
-                        tsfis.close();
                     }
                 }
                 TrustManagerFactory tmf = TrustManagerFactory.getInstance(
@@ -689,7 +681,7 @@
 
         JMXServiceURL url = new JMXServiceURL("rmi", null, 0);
 
-        Map<String, Object> env = new HashMap<String, Object>();
+        Map<String, Object> env = new HashMap<>();
 
         PermanentExporter exporter = new PermanentExporter();
 
--- a/jdk/src/share/classes/sun/management/snmp/AdaptorBootstrap.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/AdaptorBootstrap.java	Tue Jan 17 15:55:40 2012 -0800
@@ -118,21 +118,22 @@
     /**
      * Retrieve the Trap Target List from the ACL file.
      **/
+    @SuppressWarnings("unchecked")
     private static List<NotificationTarget> getTargetList(InetAddressAcl acl,
                                                           int defaultTrapPort) {
         final ArrayList<NotificationTarget> result =
-                new ArrayList<NotificationTarget>();
+                new ArrayList<>();
         if (acl != null) {
             if (log.isDebugOn())
                 log.debug("getTargetList",Agent.getText("jmxremote.AdaptorBootstrap.getTargetList.processing"));
 
-            final Enumeration td=acl.getTrapDestinations();
+            final Enumeration td = acl.getTrapDestinations();
             for (; td.hasMoreElements() ;) {
                 final InetAddress targetAddr = (InetAddress)td.nextElement();
                 final Enumeration tc =
                     acl.getTrapCommunities(targetAddr);
                 for (;tc.hasMoreElements() ;) {
-                    final String community = (String) tc.nextElement();
+                    final String community = (String)tc.nextElement();
                     final NotificationTarget target =
                         new NotificationTargetImpl(targetAddr,
                                                    defaultTrapPort,
--- a/jdk/src/share/classes/sun/management/snmp/jvminstr/JVM_MANAGEMENT_MIB_IMPL.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvminstr/JVM_MANAGEMENT_MIB_IMPL.java	Tue Jan 17 15:55:40 2012 -0800
@@ -90,14 +90,14 @@
         SnmpOidTable table = null;
         if(tableRef == null) {
             table =  new JVM_MANAGEMENT_MIBOidTable();
-            tableRef = new WeakReference<SnmpOidTable>(table);
+            tableRef = new WeakReference<>(table);
             return table;
         }
 
         table = tableRef.get();
         if(table == null) {
             table = new JVM_MANAGEMENT_MIBOidTable();
-            tableRef = new WeakReference<SnmpOidTable>(table);
+            tableRef = new WeakReference<>(table);
         }
 
         return table;
@@ -198,7 +198,7 @@
      * List of notification targets.
      */
     private ArrayList<NotificationTarget> notificationTargets =
-            new ArrayList<NotificationTarget>();
+            new ArrayList<>();
     private final NotificationEmitter emitter;
     private final NotificationHandler handler;
 
@@ -215,7 +215,7 @@
     }
 
     private synchronized void sendTrap(SnmpOid trap, SnmpVarBindList list) {
-        final Iterator iterator = notificationTargets.iterator();
+        final Iterator<NotificationTarget> iterator = notificationTargets.iterator();
         final SnmpAdaptorServer adaptor =
             (SnmpAdaptorServer) getSnmpAdaptor();
 
@@ -232,7 +232,7 @@
         while(iterator.hasNext()) {
             NotificationTarget target = null;
             try {
-                target = (NotificationTarget) iterator.next();
+                target = iterator.next();
                 SnmpPeer peer =
                     new SnmpPeer(target.getAddress(), target.getPort());
                 SnmpParameters p = new SnmpParameters();
--- a/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmMemGCTableMetaImpl.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmMemGCTableMetaImpl.java	Tue Jan 17 15:55:40 2012 -0800
@@ -58,6 +58,8 @@
  */
 public class JvmMemGCTableMetaImpl extends  JvmMemGCTableMeta {
 
+    static final long serialVersionUID = 8250461197108867607L;
+
     /**
      * This class acts as a filter over the SnmpTableHandler
      * used for the JvmMemoryManagerTable. It filters out
--- a/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmMemManagerTableMetaImpl.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmMemManagerTableMetaImpl.java	Tue Jan 17 15:55:40 2012 -0800
@@ -61,12 +61,17 @@
  */
 public class JvmMemManagerTableMetaImpl extends JvmMemManagerTableMeta {
 
+    static final long serialVersionUID = 36176771566817592L;
+
     /**
      * A concrete implementation of {@link SnmpNamedListTableCache}, for the
      * jvmMemManagerTable.
      **/
     private static class JvmMemManagerTableCache
         extends SnmpNamedListTableCache {
+
+        static final long serialVersionUID = 6564294074653009240L;
+
         /**
          * Create a weak cache for the jvmMemManagerTable.
          * @param validity validity of the cached data, in ms.
@@ -87,7 +92,7 @@
          *        <code>MemoryManagerMXBean</code> in the list.
          * @return  <code>((MemoryManagerMXBean)item).getName()</code>
          **/
-        protected String getKey(Object context, List rawDatas,
+        protected String getKey(Object context, List<?> rawDatas,
                                 int rank, Object item) {
             if (item == null) return null;
             final String name = ((MemoryManagerMXBean)item).getName();
@@ -99,7 +104,7 @@
          * Call <code>getTableHandler(JvmContextFactory.getUserData())</code>.
          **/
         public SnmpTableHandler getTableHandler() {
-            final Map userData = JvmContextFactory.getUserData();
+            final Map<Object, Object> userData = JvmContextFactory.getUserData();
             return getTableDatas(userData);
         }
 
@@ -114,7 +119,7 @@
          * Call ManagementFactory.getMemoryManagerMXBeans() to
          * load the raw data of this table.
          **/
-        protected List   loadRawDatas(Map userData) {
+        protected List<MemoryManagerMXBean> loadRawDatas(Map<Object, Object> userData) {
             return ManagementFactory.getMemoryManagerMXBeans();
         }
 
--- a/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmMemMgrPoolRelTableMetaImpl.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmMemMgrPoolRelTableMetaImpl.java	Tue Jan 17 15:55:40 2012 -0800
@@ -64,13 +64,17 @@
 public class JvmMemMgrPoolRelTableMetaImpl extends JvmMemMgrPoolRelTableMeta
     implements Serializable {
 
+    static final long serialVersionUID = 1896509775012355443L;
+
     /**
      * A concrete implementation of {@link SnmpTableCache}, for the
      * jvmMemMgrPoolRelTable.
      **/
+
     private static class JvmMemMgrPoolRelTableCache
         extends SnmpTableCache {
 
+        static final long serialVersionUID = 6059937161990659184L;
         final private JvmMemMgrPoolRelTableMetaImpl meta;
 
         /**
@@ -87,7 +91,7 @@
          * Call <code>getTableDatas(JvmContextFactory.getUserData())</code>.
          **/
         public SnmpTableHandler getTableHandler() {
-            final Map userData = JvmContextFactory.getUserData();
+            final Map<Object,Object> userData = JvmContextFactory.getUserData();
             return getTableDatas(userData);
         }
 
@@ -101,7 +105,7 @@
                 return buildPoolIndexMap((SnmpCachedData)handler);
 
             // not optimizable... too bad.
-            final Map<String, SnmpOid> m = new HashMap<String, SnmpOid>();
+            final Map<String, SnmpOid> m = new HashMap<>();
             SnmpOid index=null;
             while ((index = handler.getNext(index))!=null) {
                 final MemoryPoolMXBean mpm =
@@ -124,7 +128,7 @@
             final SnmpOid[] indexes = cached.indexes;
             final Object[]  datas   = cached.datas;
             final int len = indexes.length;
-            final Map<String, SnmpOid> m = new HashMap<String, SnmpOid>(len);
+            final Map<String, SnmpOid> m = new HashMap<>(len);
             for (int i=0; i<len; i++) {
                 final SnmpOid index = indexes[i];
                 if (index == null) continue;
@@ -165,13 +169,13 @@
             final long time = System.currentTimeMillis();
 
             //     Build a Map poolname -> index
-            final Map poolIndexMap = buildPoolIndexMap(mpHandler);
+            final Map<String,SnmpOid> poolIndexMap = buildPoolIndexMap(mpHandler);
 
             // For each memory manager, get the list of memory pools
             // For each memory pool, find its index in the memory pool table
             // Create a row in the relation table.
             final TreeMap<SnmpOid, Object> table =
-                    new TreeMap<SnmpOid, Object>(SnmpCachedData.oidComparator);
+                    new TreeMap<>(SnmpCachedData.oidComparator);
             updateTreeMap(table,userData,mmHandler,mpHandler,poolIndexMap);
 
             return new SnmpCachedData(time,table);
@@ -207,7 +211,7 @@
         protected void updateTreeMap(TreeMap<SnmpOid, Object> table, Object userData,
                                      MemoryManagerMXBean mmm,
                                      SnmpOid mmIndex,
-                                     Map poolIndexMap) {
+                                     Map<String, SnmpOid> poolIndexMap) {
 
             // The MemoryManager index is an int, so it's the first
             // and only subidentifier.
@@ -230,7 +234,7 @@
             for (int i = 0; i < mpList.length; i++) {
                 final String mpmName = mpList[i];
                 if (mpmName == null) continue;
-                final SnmpOid mpIndex = (SnmpOid)poolIndexMap.get(mpmName);
+                final SnmpOid mpIndex = poolIndexMap.get(mpmName);
                 if (mpIndex == null) continue;
 
                 // The MemoryPool index is an int, so it's the first
@@ -261,7 +265,7 @@
         protected void updateTreeMap(TreeMap<SnmpOid, Object> table, Object userData,
                                      SnmpTableHandler mmHandler,
                                      SnmpTableHandler mpHandler,
-                                     Map poolIndexMap) {
+                                     Map<String, SnmpOid> poolIndexMap) {
             if (mmHandler instanceof SnmpCachedData) {
                 updateTreeMap(table,userData,(SnmpCachedData)mmHandler,
                               mpHandler,poolIndexMap);
@@ -280,7 +284,7 @@
         protected void updateTreeMap(TreeMap<SnmpOid, Object> table, Object userData,
                                      SnmpCachedData mmHandler,
                                      SnmpTableHandler mpHandler,
-                                     Map poolIndexMap) {
+                                     Map<String, SnmpOid> poolIndexMap) {
 
             final SnmpOid[] indexes = mmHandler.indexes;
             final Object[]  datas   = mmHandler.datas;
--- a/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmMemPoolTableMetaImpl.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmMemPoolTableMetaImpl.java	Tue Jan 17 15:55:40 2012 -0800
@@ -61,11 +61,16 @@
  */
 public class JvmMemPoolTableMetaImpl extends JvmMemPoolTableMeta {
 
+    static final long serialVersionUID = -2525820976094284957L;
+
     /**
      * A concrete implementation of {@link SnmpNamedListTableCache}, for the
      * jvmMemPoolTable.
      **/
     private static class JvmMemPoolTableCache extends SnmpNamedListTableCache {
+
+        static final long serialVersionUID = -1755520683086760574L;
+
         /**
          * Create a weak cache for the jvmMemPoolTable.
          * @param validity validity of the cached data, in ms.
@@ -86,7 +91,7 @@
          *        <code>MemoryPoolMXBean</code> in the list.
          * @return  <code>((MemoryPoolMXBean)item).getName()</code>
          **/
-        protected String getKey(Object context, List rawDatas,
+        protected String getKey(Object context, List<?> rawDatas,
                                 int rank, Object item) {
             if (item == null) return null;
             final String name = ((MemoryPoolMXBean)item).getName();
@@ -98,7 +103,7 @@
          * Call <code>getTableDatas(JvmContextFactory.getUserData())</code>.
          **/
         public SnmpTableHandler getTableHandler() {
-            final Map userData = JvmContextFactory.getUserData();
+            final Map<Object, Object> userData = JvmContextFactory.getUserData();
             return getTableDatas(userData);
         }
 
@@ -113,7 +118,7 @@
          * Call ManagementFactory.getMemoryPoolMXBeans() to
          * load the raw data of this table.
          **/
-        protected List   loadRawDatas(Map userData) {
+        protected List<MemoryPoolMXBean> loadRawDatas(Map<Object, Object> userData) {
             return ManagementFactory.getMemoryPoolMXBeans();
         }
     }
--- a/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmMemoryImpl.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmMemoryImpl.java	Tue Jan 17 15:55:40 2012 -0800
@@ -275,7 +275,7 @@
      */
     public EnumJvmMemoryGCCall getJvmMemoryGCCall()
         throws SnmpStatusException {
-        final Map m = JvmContextFactory.getUserData();
+        final Map<Object,Object> m = JvmContextFactory.getUserData();
 
         if (m != null) {
             final EnumJvmMemoryGCCall cached
--- a/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmMemoryMetaImpl.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmMemoryMetaImpl.java	Tue Jan 17 15:55:40 2012 -0800
@@ -50,6 +50,8 @@
  * The class is used for representing SNMP metadata for the "JvmMemory" group.
  */
 public class JvmMemoryMetaImpl extends JvmMemoryMeta {
+
+    static final long serialVersionUID = -6500448253825893071L;
     /**
      * Constructor for the metadata associated to "JvmMemory".
      */
--- a/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmOSImpl.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmOSImpl.java	Tue Jan 17 15:55:40 2012 -0800
@@ -47,6 +47,8 @@
  */
 public class JvmOSImpl implements JvmOSMBean, Serializable {
 
+     static final long serialVersionUID = 1839834731763310809L;
+
     /**
      * Constructor for the "JvmOS" group.
      * If the group contains a table, the entries created through an
--- a/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmRTBootClassPathEntryImpl.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmRTBootClassPathEntryImpl.java	Tue Jan 17 15:55:40 2012 -0800
@@ -44,6 +44,8 @@
 public class JvmRTBootClassPathEntryImpl
     implements JvmRTBootClassPathEntryMBean, Serializable {
 
+    static final long serialVersionUID = -2282652055235913013L;
+
     private final String item;
     private final int index;
 
--- a/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmRTBootClassPathTableMetaImpl.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmRTBootClassPathTableMetaImpl.java	Tue Jan 17 15:55:40 2012 -0800
@@ -71,6 +71,8 @@
 public class JvmRTBootClassPathTableMetaImpl
     extends JvmRTBootClassPathTableMeta {
 
+    static final long serialVersionUID = -8659886610487538299L;
+
     private SnmpTableCache cache;
 
      /**
@@ -78,6 +80,7 @@
      * JvmRTBootClassPathTable.
      **/
     private static class JvmRTBootClassPathTableCache extends SnmpTableCache {
+        static final long serialVersionUID = -2637458695413646098L;
         private JvmRTBootClassPathTableMetaImpl meta;
 
         JvmRTBootClassPathTableCache(JvmRTBootClassPathTableMetaImpl meta,
@@ -90,7 +93,7 @@
          * Call <code>getTableDatas(JvmContextFactory.getUserData())</code>.
          **/
         public SnmpTableHandler getTableHandler() {
-            final Map userData = JvmContextFactory.getUserData();
+            final Map<Object,Object> userData = JvmContextFactory.getUserData();
             return getTableDatas(userData);
         }
 
--- a/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmRTClassPathEntryImpl.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmRTClassPathEntryImpl.java	Tue Jan 17 15:55:40 2012 -0800
@@ -44,6 +44,7 @@
 public class JvmRTClassPathEntryImpl implements JvmRTClassPathEntryMBean,
                                                 Serializable {
 
+    static final long serialVersionUID = 8524792845083365742L;
     private final String item;
     private final int index;
 
--- a/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmRTClassPathTableMetaImpl.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmRTClassPathTableMetaImpl.java	Tue Jan 17 15:55:40 2012 -0800
@@ -70,6 +70,8 @@
   */
 public class JvmRTClassPathTableMetaImpl extends JvmRTClassPathTableMeta {
 
+    static final long serialVersionUID = -6914494148818455166L;
+
     private SnmpTableCache cache;
 
      /**
@@ -77,6 +79,7 @@
      * JvmRTClassPathTable.
      **/
     private static class JvmRTClassPathTableCache extends SnmpTableCache {
+        static final long serialVersionUID = 3805032372592117315L;
         private JvmRTClassPathTableMetaImpl meta;
 
         JvmRTClassPathTableCache(JvmRTClassPathTableMetaImpl meta,
@@ -89,7 +92,7 @@
          * Call <code>getTableDatas(JvmContextFactory.getUserData())</code>.
          **/
         public SnmpTableHandler getTableHandler() {
-            final Map userData = JvmContextFactory.getUserData();
+            final Map<Object, Object> userData = JvmContextFactory.getUserData();
             return getTableDatas(userData);
         }
 
--- a/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmRTInputArgsEntryImpl.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmRTInputArgsEntryImpl.java	Tue Jan 17 15:55:40 2012 -0800
@@ -44,6 +44,7 @@
 public class JvmRTInputArgsEntryImpl implements JvmRTInputArgsEntryMBean,
                                                 Serializable {
 
+    static final long serialVersionUID = 1000306518436503395L;
     private final String item;
     private final int index;
 
--- a/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmRTInputArgsTableMetaImpl.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmRTInputArgsTableMetaImpl.java	Tue Jan 17 15:55:40 2012 -0800
@@ -70,6 +70,7 @@
  */
 public class JvmRTInputArgsTableMetaImpl extends JvmRTInputArgsTableMeta {
 
+    static final long serialVersionUID = -2083438094888099238L;
     private SnmpTableCache cache;
 
      /**
@@ -77,6 +78,8 @@
      * JvmRTInputArgsTable.
      **/
     private static class JvmRTInputArgsTableCache extends SnmpTableCache {
+
+        static final long serialVersionUID = 1693751105464785192L;
         private JvmRTInputArgsTableMetaImpl meta;
 
         JvmRTInputArgsTableCache(JvmRTInputArgsTableMetaImpl meta,
@@ -89,7 +92,7 @@
          * Call <code>getTableDatas(JvmContextFactory.getUserData())</code>.
          **/
         public SnmpTableHandler getTableHandler() {
-            final Map userData = JvmContextFactory.getUserData();
+            final Map<Object,Object> userData = JvmContextFactory.getUserData();
             return getTableDatas(userData);
         }
 
--- a/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmRTLibraryPathEntryImpl.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmRTLibraryPathEntryImpl.java	Tue Jan 17 15:55:40 2012 -0800
@@ -44,6 +44,7 @@
 public class JvmRTLibraryPathEntryImpl implements JvmRTLibraryPathEntryMBean,
                                                 Serializable {
 
+    static final long serialVersionUID = -3322438153507369765L;
     private final String item;
     private final int index;
 
--- a/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmRTLibraryPathTableMetaImpl.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmRTLibraryPathTableMetaImpl.java	Tue Jan 17 15:55:40 2012 -0800
@@ -70,6 +70,7 @@
   */
 public class JvmRTLibraryPathTableMetaImpl extends JvmRTLibraryPathTableMeta {
 
+    static final long serialVersionUID = 6713252710712502068L;
     private SnmpTableCache cache;
 
      /**
@@ -77,6 +78,7 @@
      * JvmRTLibraryPathTable.
      **/
     private static class JvmRTLibraryPathTableCache extends SnmpTableCache {
+        static final long serialVersionUID = 2035304445719393195L;
         private JvmRTLibraryPathTableMetaImpl meta;
 
         JvmRTLibraryPathTableCache(JvmRTLibraryPathTableMetaImpl meta,
@@ -89,7 +91,7 @@
          * Call <code>getTableDatas(JvmContextFactory.getUserData())</code>.
          **/
         public SnmpTableHandler getTableHandler() {
-            final Map userData = JvmContextFactory.getUserData();
+            final Map<Object,Object> userData = JvmContextFactory.getUserData();
             return getTableDatas(userData);
         }
 
--- a/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmRuntimeMetaImpl.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmRuntimeMetaImpl.java	Tue Jan 17 15:55:40 2012 -0800
@@ -68,6 +68,7 @@
  */
 public class JvmRuntimeMetaImpl extends JvmRuntimeMeta {
 
+     static final long serialVersionUID = -6570428414857608618L;
     /**
      * Constructor for the metadata associated to "JvmRuntime".
      */
--- a/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmThreadInstanceEntryImpl.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmThreadInstanceEntryImpl.java	Tue Jan 17 15:55:40 2012 -0800
@@ -53,6 +53,8 @@
 public class JvmThreadInstanceEntryImpl
     implements JvmThreadInstanceEntryMBean, Serializable {
 
+    static final long serialVersionUID = 910173589985461347L;
+
     public final static class ThreadStateMap {
         public final static class Byte0 {
             public final static byte inNative     = (byte)0x80; // bit 1
--- a/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmThreadInstanceTableMetaImpl.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmThreadInstanceTableMetaImpl.java	Tue Jan 17 15:55:40 2012 -0800
@@ -78,6 +78,8 @@
 public class JvmThreadInstanceTableMetaImpl
     extends JvmThreadInstanceTableMeta {
 
+    static final long serialVersionUID = -8432271929226397492L;
+
     /**
      * Maximum depth of the stacktrace that might be returned through
      * SNMP.
@@ -135,6 +137,7 @@
     private static class JvmThreadInstanceTableCache
         extends SnmpTableCache {
 
+        static final long serialVersionUID = 4947330124563406878L;
         final private JvmThreadInstanceTableMetaImpl meta;
 
         /**
@@ -151,7 +154,7 @@
          * Call <code>getTableDatas(JvmContextFactory.getUserData())</code>.
          **/
         public SnmpTableHandler getTableHandler() {
-            final Map userData = JvmContextFactory.getUserData();
+            final Map<Object, Object> userData = JvmContextFactory.getUserData();
             return getTableDatas(userData);
         }
 
@@ -172,7 +175,7 @@
 
             SnmpOid indexes[] = new SnmpOid[id.length];
             final TreeMap<SnmpOid, Object> table =
-                    new TreeMap<SnmpOid, Object>(SnmpCachedData.oidComparator);
+                    new TreeMap<>(SnmpCachedData.oidComparator);
             for(int i = 0; i < id.length; i++) {
                 log.debug("", "Making index for thread id [" + id[i] +"]");
                 //indexes[i] = makeOid(id[i]);
@@ -277,7 +280,7 @@
 
         // Get the request contextual cache (userData).
         //
-        final Map m = JvmContextFactory.getUserData();
+        final Map<Object,Object> m = JvmContextFactory.getUserData();
 
         // Get the handler.
         //
--- a/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmThreadingMetaImpl.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmThreadingMetaImpl.java	Tue Jan 17 15:55:40 2012 -0800
@@ -66,6 +66,8 @@
  */
 public class JvmThreadingMetaImpl extends JvmThreadingMeta {
 
+    static final long serialVersionUID = -2104788458393251457L;
+
     /**
      * Constructor for the metadata associated to "JvmThreading".
      */
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmClassesVerboseLevel.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmClassesVerboseLevel.java	Tue Jan 17 15:55:40 2012 -0800
@@ -43,10 +43,11 @@
  */
 public class EnumJvmClassesVerboseLevel extends Enumerated implements Serializable {
 
+    static final long serialVersionUID = -620710366914810374L;
     protected static Hashtable<Integer, String> intTable =
-            new Hashtable<Integer, String>();
+            new Hashtable<>();
     protected static Hashtable<String, Integer> stringTable =
-            new Hashtable<String, Integer>();
+            new Hashtable<>();
     static  {
         intTable.put(new Integer(2), "verbose");
         intTable.put(new Integer(1), "silent");
@@ -70,11 +71,11 @@
         super(x);
     }
 
-    protected Hashtable getIntTable() {
+    protected Hashtable<Integer,String> getIntTable() {
         return intTable ;
     }
 
-    protected Hashtable getStringTable() {
+    protected Hashtable<String,Integer> getStringTable() {
         return stringTable ;
     }
 
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmJITCompilerTimeMonitoring.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmJITCompilerTimeMonitoring.java	Tue Jan 17 15:55:40 2012 -0800
@@ -43,10 +43,11 @@
  */
 public class EnumJvmJITCompilerTimeMonitoring extends Enumerated implements Serializable {
 
+    static final long serialVersionUID = 3953565918146461236L;
     protected static Hashtable<Integer, String> intTable =
-            new Hashtable<Integer, String>();
+            new Hashtable<>();
     protected static Hashtable<String, Integer> stringTable =
-            new Hashtable<String, Integer>();
+            new Hashtable<>();
     static  {
         intTable.put(new Integer(2), "supported");
         intTable.put(new Integer(1), "unsupported");
@@ -70,11 +71,11 @@
         super(x);
     }
 
-    protected Hashtable getIntTable() {
+    protected Hashtable<Integer, String> getIntTable() {
         return intTable ;
     }
 
-    protected Hashtable getStringTable() {
+    protected Hashtable<String, Integer> getStringTable() {
         return stringTable ;
     }
 
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmMemManagerState.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmMemManagerState.java	Tue Jan 17 15:55:40 2012 -0800
@@ -43,10 +43,12 @@
  */
 public class EnumJvmMemManagerState extends Enumerated implements Serializable {
 
+    static final long serialVersionUID = 8249515157795166343L;
+
     protected static Hashtable<Integer, String> intTable =
-            new Hashtable<Integer, String>();
+            new Hashtable<>();
     protected static Hashtable<String, Integer> stringTable =
-            new Hashtable<String, Integer>();
+            new Hashtable<>();
     static  {
         intTable.put(new Integer(2), "valid");
         intTable.put(new Integer(1), "invalid");
@@ -70,11 +72,11 @@
         super(x);
     }
 
-    protected Hashtable getIntTable() {
+    protected Hashtable<Integer, String> getIntTable() {
         return intTable ;
     }
 
-    protected Hashtable getStringTable() {
+    protected Hashtable<String, Integer> getStringTable() {
         return stringTable ;
     }
 
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmMemPoolCollectThreshdSupport.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmMemPoolCollectThreshdSupport.java	Tue Jan 17 15:55:40 2012 -0800
@@ -43,10 +43,11 @@
  */
 public class EnumJvmMemPoolCollectThreshdSupport extends Enumerated implements Serializable {
 
+    static final long serialVersionUID = 8610091819732806282L;
     protected static Hashtable<Integer, String> intTable =
-            new Hashtable<Integer, String>();
+            new Hashtable<>();
     protected static Hashtable<String, Integer> stringTable =
-            new Hashtable<String, Integer>();
+            new Hashtable<>();
     static  {
         intTable.put(new Integer(2), "supported");
         intTable.put(new Integer(1), "unsupported");
@@ -70,11 +71,11 @@
         super(x);
     }
 
-    protected Hashtable getIntTable() {
+    protected Hashtable<Integer, String> getIntTable() {
         return intTable ;
     }
 
-    protected Hashtable getStringTable() {
+    protected Hashtable<String, Integer> getStringTable() {
         return stringTable ;
     }
 
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmMemPoolState.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmMemPoolState.java	Tue Jan 17 15:55:40 2012 -0800
@@ -43,10 +43,11 @@
  */
 public class EnumJvmMemPoolState extends Enumerated implements Serializable {
 
+    static final long serialVersionUID = 3038175407527743027L;
     protected static Hashtable<Integer, String> intTable =
-            new Hashtable<Integer, String>();
+            new Hashtable<>();
     protected static Hashtable<String, Integer> stringTable =
-            new Hashtable<String, Integer>();
+            new Hashtable<>();
     static  {
         intTable.put(new Integer(2), "valid");
         intTable.put(new Integer(1), "invalid");
@@ -70,11 +71,11 @@
         super(x);
     }
 
-    protected Hashtable getIntTable() {
+    protected Hashtable<Integer,String> getIntTable() {
         return intTable ;
     }
 
-    protected Hashtable getStringTable() {
+    protected Hashtable<String,Integer> getStringTable() {
         return stringTable ;
     }
 
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmMemPoolThreshdSupport.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmMemPoolThreshdSupport.java	Tue Jan 17 15:55:40 2012 -0800
@@ -43,10 +43,11 @@
  */
 public class EnumJvmMemPoolThreshdSupport extends Enumerated implements Serializable {
 
+    static final long serialVersionUID = 7014693561120661029L;
     protected static Hashtable<Integer, String> intTable =
-            new Hashtable<Integer, String>();
+            new Hashtable<>();
     protected static Hashtable<String, Integer> stringTable =
-            new Hashtable<String, Integer>();
+            new Hashtable<>();
     static  {
         intTable.put(new Integer(2), "supported");
         intTable.put(new Integer(1), "unsupported");
@@ -70,11 +71,11 @@
         super(x);
     }
 
-    protected Hashtable getIntTable() {
+    protected Hashtable<Integer,String> getIntTable() {
         return intTable ;
     }
 
-    protected Hashtable getStringTable() {
+    protected Hashtable<String,Integer> getStringTable() {
         return stringTable ;
     }
 
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmMemPoolType.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmMemPoolType.java	Tue Jan 17 15:55:40 2012 -0800
@@ -43,10 +43,11 @@
  */
 public class EnumJvmMemPoolType extends Enumerated implements Serializable {
 
+    static final long serialVersionUID = -7214498472962396555L;
     protected static Hashtable<Integer, String> intTable =
-            new Hashtable<Integer, String>();
+            new Hashtable<>();
     protected static Hashtable<String, Integer> stringTable =
-            new Hashtable<String, Integer>();
+            new Hashtable<>();
     static  {
         intTable.put(new Integer(2), "heap");
         intTable.put(new Integer(1), "nonheap");
@@ -70,11 +71,11 @@
         super(x);
     }
 
-    protected Hashtable getIntTable() {
+    protected Hashtable<Integer,String> getIntTable() {
         return intTable ;
     }
 
-    protected Hashtable getStringTable() {
+    protected Hashtable<String,Integer> getStringTable() {
         return stringTable ;
     }
 
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmMemoryGCCall.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmMemoryGCCall.java	Tue Jan 17 15:55:40 2012 -0800
@@ -43,10 +43,11 @@
  */
 public class EnumJvmMemoryGCCall extends Enumerated implements Serializable {
 
+    static final long serialVersionUID = -2869147994287351375L;
     protected static Hashtable<Integer, String> intTable =
-            new Hashtable<Integer, String>();
+            new Hashtable<>();
     protected static Hashtable<String, Integer> stringTable =
-            new Hashtable<String, Integer>();
+            new Hashtable<>();
     static  {
         intTable.put(new Integer(2), "supported");
         intTable.put(new Integer(5), "failed");
@@ -76,11 +77,11 @@
         super(x);
     }
 
-    protected Hashtable getIntTable() {
+    protected Hashtable<Integer, String> getIntTable() {
         return intTable ;
     }
 
-    protected Hashtable getStringTable() {
+    protected Hashtable<String, Integer> getStringTable() {
         return stringTable ;
     }
 
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmMemoryGCVerboseLevel.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmMemoryGCVerboseLevel.java	Tue Jan 17 15:55:40 2012 -0800
@@ -43,10 +43,11 @@
  */
 public class EnumJvmMemoryGCVerboseLevel extends Enumerated implements Serializable {
 
+    static final long serialVersionUID = 1362427628755978190L;
     protected static Hashtable<Integer, String> intTable =
-            new Hashtable<Integer, String>();
+            new Hashtable<>();
     protected static Hashtable<String, Integer> stringTable =
-            new Hashtable<String, Integer>();
+            new Hashtable<>();
     static  {
         intTable.put(new Integer(2), "verbose");
         intTable.put(new Integer(1), "silent");
@@ -70,11 +71,11 @@
         super(x);
     }
 
-    protected Hashtable getIntTable() {
+    protected Hashtable<Integer,String> getIntTable() {
         return intTable ;
     }
 
-    protected Hashtable getStringTable() {
+    protected Hashtable<String,Integer> getStringTable() {
         return stringTable ;
     }
 
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmRTBootClassPathSupport.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmRTBootClassPathSupport.java	Tue Jan 17 15:55:40 2012 -0800
@@ -43,10 +43,11 @@
  */
 public class EnumJvmRTBootClassPathSupport extends Enumerated implements Serializable {
 
+    static final long serialVersionUID = -5957542680437939894L;
     protected static Hashtable<Integer, String> intTable =
-            new Hashtable<Integer, String>();
+            new Hashtable<>();
     protected static Hashtable<String, Integer> stringTable =
-            new Hashtable<String, Integer>();
+            new Hashtable<>();
     static  {
         intTable.put(new Integer(2), "supported");
         intTable.put(new Integer(1), "unsupported");
@@ -70,11 +71,11 @@
         super(x);
     }
 
-    protected Hashtable getIntTable() {
+    protected Hashtable<Integer, String> getIntTable() {
         return intTable ;
     }
 
-    protected Hashtable getStringTable() {
+    protected Hashtable<String, Integer> getStringTable() {
         return stringTable ;
     }
 
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmThreadContentionMonitoring.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmThreadContentionMonitoring.java	Tue Jan 17 15:55:40 2012 -0800
@@ -43,10 +43,11 @@
  */
 public class EnumJvmThreadContentionMonitoring extends Enumerated implements Serializable {
 
+    static final long serialVersionUID = -6411827583604137210L;
     protected static Hashtable<Integer, String> intTable =
-            new Hashtable<Integer, String>();
+            new Hashtable<>();
     protected static Hashtable<String, Integer> stringTable =
-            new Hashtable<String, Integer>();
+            new Hashtable<>();
     static  {
         intTable.put(new Integer(3), "enabled");
         intTable.put(new Integer(4), "disabled");
@@ -72,11 +73,11 @@
         super(x);
     }
 
-    protected Hashtable getIntTable() {
+    protected Hashtable<Integer,String> getIntTable() {
         return intTable ;
     }
 
-    protected Hashtable getStringTable() {
+    protected Hashtable<String,Integer> getStringTable() {
         return stringTable ;
     }
 
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmThreadCpuTimeMonitoring.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/EnumJvmThreadCpuTimeMonitoring.java	Tue Jan 17 15:55:40 2012 -0800
@@ -43,10 +43,11 @@
  */
 public class EnumJvmThreadCpuTimeMonitoring extends Enumerated implements Serializable {
 
+    static final long serialVersionUID = -532837824105215699L;
     protected static Hashtable<Integer, String> intTable =
-            new Hashtable<Integer, String>();
+            new Hashtable<>();
     protected static Hashtable<String, Integer> stringTable =
-            new Hashtable<String, Integer>();
+            new Hashtable<>();
     static  {
         intTable.put(new Integer(3), "enabled");
         intTable.put(new Integer(4), "disabled");
@@ -72,11 +73,11 @@
         super(x);
     }
 
-    protected Hashtable getIntTable() {
+    protected Hashtable<Integer,String> getIntTable() {
         return intTable ;
     }
 
-    protected Hashtable getStringTable() {
+    protected Hashtable<String,Integer> getStringTable() {
         return stringTable ;
     }
 
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/JVM_MANAGEMENT_MIB.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/JVM_MANAGEMENT_MIB.java	Tue Jan 17 15:55:40 2012 -0800
@@ -53,6 +53,7 @@
  */
 public abstract class JVM_MANAGEMENT_MIB extends SnmpMib implements Serializable {
 
+    static final long serialVersionUID = 6895037919735816732L;
     /**
      * Default constructor. Initialize the Mib tree.
      */
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/JVM_MANAGEMENT_MIBOidTable.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/JVM_MANAGEMENT_MIBOidTable.java	Tue Jan 17 15:55:40 2012 -0800
@@ -47,6 +47,7 @@
  */
 public class JVM_MANAGEMENT_MIBOidTable extends SnmpOidTableSupport implements Serializable {
 
+    static final long serialVersionUID = -5010870014488732061L;
     /**
      * Default constructor. Initialize the Mib tree.
      */
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmClassLoadingMeta.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmClassLoadingMeta.java	Tue Jan 17 15:55:40 2012 -0800
@@ -70,6 +70,7 @@
 public class JvmClassLoadingMeta extends SnmpMibGroup
      implements Serializable, SnmpStandardMetaServer {
 
+    static final long serialVersionUID = 5722857476941218568L;
     /**
      * Constructor for the metadata associated to "JvmClassLoading".
      */
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmCompilationMeta.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmCompilationMeta.java	Tue Jan 17 15:55:40 2012 -0800
@@ -70,6 +70,7 @@
 public class JvmCompilationMeta extends SnmpMibGroup
      implements Serializable, SnmpStandardMetaServer {
 
+    static final long serialVersionUID = -95492874115033638L;
     /**
      * Constructor for the metadata associated to "JvmCompilation".
      */
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmMemGCEntryMeta.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmMemGCEntryMeta.java	Tue Jan 17 15:55:40 2012 -0800
@@ -71,6 +71,7 @@
 public class JvmMemGCEntryMeta extends SnmpMibEntry
      implements Serializable, SnmpStandardMetaServer {
 
+     static final long serialVersionUID = 6082082529298387063L;
     /**
      * Constructor for the metadata associated to "JvmMemGCEntry".
      */
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmMemGCTableMeta.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmMemGCTableMeta.java	Tue Jan 17 15:55:40 2012 -0800
@@ -68,6 +68,7 @@
  */
 public class JvmMemGCTableMeta extends SnmpMibTable implements Serializable {
 
+    static final long serialVersionUID = -8843296871149264612L;
     /**
      * Constructor for the table. Initialize metadata for "JvmMemGCTableMeta".
      * The reference on the MBean server is updated so the entries created through an SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmMemManagerEntryMeta.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmMemManagerEntryMeta.java	Tue Jan 17 15:55:40 2012 -0800
@@ -71,6 +71,7 @@
 public class JvmMemManagerEntryMeta extends SnmpMibEntry
      implements Serializable, SnmpStandardMetaServer {
 
+    static final long serialVersionUID = 8166956416408970453L;
     /**
      * Constructor for the metadata associated to "JvmMemManagerEntry".
      */
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmMemManagerTableMeta.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmMemManagerTableMeta.java	Tue Jan 17 15:55:40 2012 -0800
@@ -68,6 +68,7 @@
  */
 public class JvmMemManagerTableMeta extends SnmpMibTable implements Serializable {
 
+    static final long serialVersionUID = 5026520607518015233L;
     /**
      * Constructor for the table. Initialize metadata for "JvmMemManagerTableMeta".
      * The reference on the MBean server is updated so the entries created through an SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmMemMgrPoolRelEntryMeta.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmMemMgrPoolRelEntryMeta.java	Tue Jan 17 15:55:40 2012 -0800
@@ -71,6 +71,7 @@
 public class JvmMemMgrPoolRelEntryMeta extends SnmpMibEntry
      implements Serializable, SnmpStandardMetaServer {
 
+    static final long serialVersionUID = 7414270971113459798L;
     /**
      * Constructor for the metadata associated to "JvmMemMgrPoolRelEntry".
      */
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmMemMgrPoolRelTableMeta.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmMemMgrPoolRelTableMeta.java	Tue Jan 17 15:55:40 2012 -0800
@@ -68,6 +68,7 @@
  */
 public class JvmMemMgrPoolRelTableMeta extends SnmpMibTable implements Serializable {
 
+    static final long serialVersionUID = -310733366542788998L;
     /**
      * Constructor for the table. Initialize metadata for "JvmMemMgrPoolRelTableMeta".
      * The reference on the MBean server is updated so the entries created through an SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmMemPoolEntryMeta.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmMemPoolEntryMeta.java	Tue Jan 17 15:55:40 2012 -0800
@@ -71,6 +71,7 @@
 public class JvmMemPoolEntryMeta extends SnmpMibEntry
      implements Serializable, SnmpStandardMetaServer {
 
+    static final long serialVersionUID = 7220682779249102830L;
     /**
      * Constructor for the metadata associated to "JvmMemPoolEntry".
      */
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmMemPoolTableMeta.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmMemPoolTableMeta.java	Tue Jan 17 15:55:40 2012 -0800
@@ -68,6 +68,8 @@
  */
 public class JvmMemPoolTableMeta extends SnmpMibTable implements Serializable {
 
+    static final long serialVersionUID = -2799470815264898659L;
+
     /**
      * Constructor for the table. Initialize metadata for "JvmMemPoolTableMeta".
      * The reference on the MBean server is updated so the entries created through an SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmOSMeta.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmOSMeta.java	Tue Jan 17 15:55:40 2012 -0800
@@ -70,6 +70,8 @@
 public class JvmOSMeta extends SnmpMibGroup
      implements Serializable, SnmpStandardMetaServer {
 
+    static final long serialVersionUID = -2024138733580127133L;
+
     /**
      * Constructor for the metadata associated to "JvmOS".
      */
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmRTBootClassPathEntryMeta.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmRTBootClassPathEntryMeta.java	Tue Jan 17 15:55:40 2012 -0800
@@ -71,6 +71,7 @@
 public class JvmRTBootClassPathEntryMeta extends SnmpMibEntry
      implements Serializable, SnmpStandardMetaServer {
 
+    static final long serialVersionUID = 7703840715080588941L;
     /**
      * Constructor for the metadata associated to "JvmRTBootClassPathEntry".
      */
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmRTBootClassPathTableMeta.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmRTBootClassPathTableMeta.java	Tue Jan 17 15:55:40 2012 -0800
@@ -68,6 +68,7 @@
  */
 public class JvmRTBootClassPathTableMeta extends SnmpMibTable implements Serializable {
 
+    static final long serialVersionUID = 42471379600792135L;
     /**
      * Constructor for the table. Initialize metadata for "JvmRTBootClassPathTableMeta".
      * The reference on the MBean server is updated so the entries created through an SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmRTClassPathEntryMeta.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmRTClassPathEntryMeta.java	Tue Jan 17 15:55:40 2012 -0800
@@ -71,6 +71,7 @@
 public class JvmRTClassPathEntryMeta extends SnmpMibEntry
      implements Serializable, SnmpStandardMetaServer {
 
+    static final long serialVersionUID = 3388703998226830801L;
     /**
      * Constructor for the metadata associated to "JvmRTClassPathEntry".
      */
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmRTClassPathTableMeta.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmRTClassPathTableMeta.java	Tue Jan 17 15:55:40 2012 -0800
@@ -68,6 +68,7 @@
  */
 public class JvmRTClassPathTableMeta extends SnmpMibTable implements Serializable {
 
+    static final long serialVersionUID = -1518727175345404443L;
     /**
      * Constructor for the table. Initialize metadata for "JvmRTClassPathTableMeta".
      * The reference on the MBean server is updated so the entries created through an SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmRTInputArgsEntryMeta.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmRTInputArgsEntryMeta.java	Tue Jan 17 15:55:40 2012 -0800
@@ -71,6 +71,7 @@
 public class JvmRTInputArgsEntryMeta extends SnmpMibEntry
      implements Serializable, SnmpStandardMetaServer {
 
+    static final long serialVersionUID = -7729576810347358025L;
     /**
      * Constructor for the metadata associated to "JvmRTInputArgsEntry".
      */
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmRTInputArgsTableMeta.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmRTInputArgsTableMeta.java	Tue Jan 17 15:55:40 2012 -0800
@@ -68,6 +68,7 @@
  */
 public class JvmRTInputArgsTableMeta extends SnmpMibTable implements Serializable {
 
+    static final long serialVersionUID = 5395531763015738645L;
     /**
      * Constructor for the table. Initialize metadata for "JvmRTInputArgsTableMeta".
      * The reference on the MBean server is updated so the entries created through an SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmRTLibraryPathEntryMeta.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmRTLibraryPathEntryMeta.java	Tue Jan 17 15:55:40 2012 -0800
@@ -71,6 +71,7 @@
 public class JvmRTLibraryPathEntryMeta extends SnmpMibEntry
      implements Serializable, SnmpStandardMetaServer {
 
+    static final long serialVersionUID = -5851555586263475792L;
     /**
      * Constructor for the metadata associated to "JvmRTLibraryPathEntry".
      */
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmRTLibraryPathTableMeta.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmRTLibraryPathTableMeta.java	Tue Jan 17 15:55:40 2012 -0800
@@ -68,6 +68,7 @@
  */
 public class JvmRTLibraryPathTableMeta extends SnmpMibTable implements Serializable {
 
+    static final long serialVersionUID = -632403620113109468L;
     /**
      * Constructor for the table. Initialize metadata for "JvmRTLibraryPathTableMeta".
      * The reference on the MBean server is updated so the entries created through an SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmRuntimeMeta.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmRuntimeMeta.java	Tue Jan 17 15:55:40 2012 -0800
@@ -70,6 +70,7 @@
 public class JvmRuntimeMeta extends SnmpMibGroup
      implements Serializable, SnmpStandardMetaServer {
 
+    static final long serialVersionUID = 1994595220765880109L;
     /**
      * Constructor for the metadata associated to "JvmRuntime".
      */
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmThreadInstanceEntryMeta.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmThreadInstanceEntryMeta.java	Tue Jan 17 15:55:40 2012 -0800
@@ -71,6 +71,7 @@
 public class JvmThreadInstanceEntryMeta extends SnmpMibEntry
      implements Serializable, SnmpStandardMetaServer {
 
+    static final long serialVersionUID = -2015330111801477399L;
     /**
      * Constructor for the metadata associated to "JvmThreadInstanceEntry".
      */
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmThreadInstanceTableMeta.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmThreadInstanceTableMeta.java	Tue Jan 17 15:55:40 2012 -0800
@@ -68,6 +68,7 @@
  */
 public class JvmThreadInstanceTableMeta extends SnmpMibTable implements Serializable {
 
+    static final long serialVersionUID = 2519514732589115954L;
     /**
      * Constructor for the table. Initialize metadata for "JvmThreadInstanceTableMeta".
      * The reference on the MBean server is updated so the entries created through an SNMP SET will be AUTOMATICALLY REGISTERED in Java DMK.
--- a/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmThreadingMeta.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/jvmmib/JvmThreadingMeta.java	Tue Jan 17 15:55:40 2012 -0800
@@ -70,6 +70,7 @@
 public class JvmThreadingMeta extends SnmpMibGroup
      implements Serializable, SnmpStandardMetaServer {
 
+    static final long serialVersionUID = 5223833578005322854L;
     /**
      * Constructor for the metadata associated to "JvmThreading".
      */
--- a/jdk/src/share/classes/sun/management/snmp/util/MibLogger.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/util/MibLogger.java	Tue Jan 17 15:55:40 2012 -0800
@@ -32,7 +32,7 @@
     final Logger logger;
     final String className;
 
-    static String getClassName(Class clazz) {
+    static String getClassName(Class<?> clazz) {
         if (clazz == null) return null;
         if (clazz.isArray())
             return getClassName(clazz.getComponentType()) + "[]";
@@ -44,7 +44,7 @@
         else return fullname.substring(lastpoint+1,len);
     }
 
-    static String getLoggerName(Class clazz) {
+    static String getLoggerName(Class<?> clazz) {
         if (clazz == null) return "sun.management.snmp.jvminstr";
         Package p = clazz.getPackage();
         if (p == null) return "sun.management.snmp.jvminstr";
@@ -53,11 +53,11 @@
         else return pname;
     }
 
-    public MibLogger(Class clazz) {
+    public MibLogger(Class<?> clazz) {
         this(getLoggerName(clazz),getClassName(clazz));
     }
 
-    public MibLogger(Class clazz, String postfix) {
+    public MibLogger(Class<?> clazz, String postfix) {
         this(getLoggerName(clazz)+((postfix==null)?"":"."+postfix),
              getClassName(clazz));
     }
--- a/jdk/src/share/classes/sun/management/snmp/util/SnmpListTableCache.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/util/SnmpListTableCache.java	Tue Jan 17 15:55:40 2012 -0800
@@ -59,7 +59,7 @@
      *        <var>rawDatas</var> list iterator.
      * @param item The raw data object for which an index must be determined.
      **/
-    protected abstract SnmpOid getIndex(Object context, List rawDatas,
+    protected abstract SnmpOid getIndex(Object context, List<?> rawDatas,
                                         int rank, Object item);
 
     /**
@@ -75,7 +75,7 @@
      *        extracted.
      * @return By default <var>item</var> is returned.
      **/
-    protected Object getData(Object context, List rawDatas,
+    protected Object getData(Object context, List<?> rawDatas,
                              int rank, Object item) {
         return item;
     }
@@ -95,14 +95,14 @@
      *        computed.
      * @return the computed cached data.
      **/
-    protected SnmpCachedData updateCachedDatas(Object context, List rawDatas) {
+    protected SnmpCachedData updateCachedDatas(Object context, List<?> rawDatas) {
         final int size = ((rawDatas == null)?0:rawDatas.size());
         if (size == 0) return  null;
 
         final long time = System.currentTimeMillis();
-        final Iterator it  = rawDatas.iterator();
+        final Iterator<?> it  = rawDatas.iterator();
         final TreeMap<SnmpOid, Object> map =
-                new TreeMap<SnmpOid, Object>(SnmpCachedData.oidComparator);
+                new TreeMap<>(SnmpCachedData.oidComparator);
         for (int rank=0; it.hasNext() ; rank++) {
             final Object  item  = it.next();
             final SnmpOid index = getIndex(context, rawDatas, rank, item);
--- a/jdk/src/share/classes/sun/management/snmp/util/SnmpNamedListTableCache.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/util/SnmpNamedListTableCache.java	Tue Jan 17 15:55:40 2012 -0800
@@ -55,7 +55,7 @@
      * This map associate an entry name with the SnmpOid index that's
      * been allocated for it.
      **/
-    protected TreeMap names = new TreeMap();
+    protected TreeMap<String, SnmpOid> names = new TreeMap<>();
 
     /**
      * The last allocate index.
@@ -80,7 +80,7 @@
      *        <var>rawDatas</var> list iterator.
      * @param item The raw data object for which a key name must be determined.
      **/
-    protected abstract String getKey(Object context, List rawDatas,
+    protected abstract String getKey(Object context, List<?> rawDatas,
                                      int rank, Object item);
 
     /**
@@ -97,7 +97,7 @@
      *        <var>rawDatas</var> list iterator.
      * @param item The raw data object for which an index must be determined.
      **/
-    protected SnmpOid makeIndex(Object context, List rawDatas,
+    protected SnmpOid makeIndex(Object context, List<?> rawDatas,
                                 int rank, Object item) {
 
         // check we are in the limits of an unsigned32.
@@ -151,7 +151,7 @@
      *        <var>rawDatas</var> list iterator.
      * @param item The raw data object for which an index must be determined.
      **/
-    protected SnmpOid getIndex(Object context, List rawDatas,
+    protected SnmpOid getIndex(Object context, List<?> rawDatas,
                                int rank, Object item) {
         final String key   = getKey(context,rawDatas,rank,item);
         final Object index = (names==null||key==null)?null:names.get(key);
@@ -174,8 +174,8 @@
      * @param rawDatas The table datas from which the cached data will be
      *        computed.
      **/
-    protected SnmpCachedData updateCachedDatas(Object context, List rawDatas) {
-        TreeMap ctxt = new TreeMap();
+    protected SnmpCachedData updateCachedDatas(Object context, List<?> rawDatas) {
+        TreeMap<String,SnmpOid> ctxt = new TreeMap<>();
         final SnmpCachedData result =
             super.updateCachedDatas(context,rawDatas);
         names = ctxt;
@@ -191,7 +191,7 @@
      *        the {@link JvmContextFactory}.
      *
      **/
-    protected abstract List   loadRawDatas(Map userData);
+    protected abstract List<?>  loadRawDatas(Map<Object,Object> userData);
 
     /**
      *The name under which the raw data is to be found/put in
@@ -212,16 +212,16 @@
      *        the request contextual cache.
      *
      **/
-    protected List getRawDatas(Map<Object, Object> userData, String key) {
-        List rawDatas = null;
+    protected List<?> getRawDatas(Map<Object, Object> userData, String key) {
+        List<?> rawDatas = null;
 
         // Look for memory manager list in request contextual cache.
         if (userData != null)
-            rawDatas = (List) userData.get(key);
+            rawDatas =  (List<?>)userData.get(key);
 
         if (rawDatas == null) {
             // No list in contextual cache, get it from API
-            rawDatas =  loadRawDatas(userData);
+            rawDatas = loadRawDatas(userData);
 
 
             // Put list in cache...
@@ -250,12 +250,12 @@
             (context instanceof Map)?Util.<Map<Object, Object>>cast(context):null;
 
         // Look for memory manager list in request contextual cache.
-        final List rawDatas = getRawDatas(userData,getRawDatasKey());
+        final List<?> rawDatas = getRawDatas(userData,getRawDatasKey());
 
         log.debug("updateCachedDatas","rawDatas.size()=" +
               ((rawDatas==null)?"<no data>":""+rawDatas.size()));
 
-        TreeMap ctxt = new TreeMap();
+        TreeMap<String,SnmpOid> ctxt = new TreeMap<>();
         final SnmpCachedData result =
             super.updateCachedDatas(ctxt,rawDatas);
         names = ctxt;
--- a/jdk/src/share/classes/sun/management/snmp/util/SnmpTableCache.java	Tue Jan 17 14:10:04 2012 +0000
+++ b/jdk/src/share/classes/sun/management/snmp/util/SnmpTableCache.java	Tue Jan 17 15:55:40 2012 -0800
@@ -98,7 +98,7 @@
         final SnmpCachedData cached   = getCachedDatas();
         if (cached != null) return cached;
         final SnmpCachedData computedDatas = updateCachedDatas(context);
-        if (validity != 0) datas = new WeakReference<SnmpCachedData>(computedDatas);
+        if (validity != 0) datas = new WeakReference<>(computedDatas);
         return computedDatas;
     }