--- old/src/java.base/share/classes/java/lang/Class.java 2015-04-22 17:43:41.603422518 -0700 +++ new/src/java.base/share/classes/java/lang/Class.java 2015-04-22 17:43:41.427422514 -0700 @@ -437,7 +437,7 @@ // (the stack depth is wrong for the Constructor's // security check to work) java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { + new java.security.PrivilegedAction<>() { public Void run() { c.setAccessible(true); return null; @@ -1068,7 +1068,7 @@ Reflection.getCallerClass(), true); // Client is ok to access declared methods but j.l.Class might not be. Method[] candidates = AccessController.doPrivileged( - new PrivilegedAction() { + new PrivilegedAction<>() { @Override public Method[] run() { return enclosingCandidate.getDeclaredMethods(); @@ -1228,7 +1228,7 @@ Reflection.getCallerClass(), true); // Client is ok to access declared methods but j.l.Class might not be. Constructor[] candidates = AccessController.doPrivileged( - new PrivilegedAction[]>() { + new PrivilegedAction<>() { @Override public Constructor[] run() { return enclosingCandidate.getDeclaredConstructors(); @@ -1542,7 +1542,7 @@ // has already been ok'd by the SecurityManager. return java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction[]>() { + new java.security.PrivilegedAction<>() { public Class[] run() { List> list = new ArrayList<>(); Class currentClass = Class.this; @@ -3293,7 +3293,7 @@ private static boolean initted = false; private static void checkInitted() { if (initted) return; - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<>() { public Void run() { // Tests to ensure the system properties table is fully // initialized. This is needed because reflection code is @@ -3349,7 +3349,7 @@ try { final Method values = getMethod("values"); java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { + new java.security.PrivilegedAction<>() { public Void run() { values.setAccessible(true); return null;