jdk/src/share/classes/sun/management/GcInfoCompositeData.java
changeset 11530 a9d059c15b80
parent 9698 8b66cd6c5ebc
child 14342 8435a30053c1
--- 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);
         }