--- old/src/share/classes/sun/awt/datatransfer/TransferableProxy.java 2014-04-07 13:31:28.330639529 -0700 +++ new/src/share/classes/sun/awt/datatransfer/TransferableProxy.java 2014-04-07 13:31:27.983972847 -0700 @@ -111,9 +111,9 @@ } protected void annotateClass(final Class cl) throws IOException { - ClassLoader classLoader = - (ClassLoader)AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { + ClassLoader classLoader = AccessController.doPrivileged( + new PrivilegedAction() { + public ClassLoader run() { return cl.getClassLoader(); } }); @@ -124,14 +124,14 @@ map.put(s, classLoader); } protected void annotateProxyClass(final Class cl) throws IOException { - ClassLoader classLoader = - (ClassLoader)AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { + ClassLoader classLoader = AccessController.doPrivileged( + new PrivilegedAction() { + public ClassLoader run() { return cl.getClassLoader(); } }); - Class[] interfaces = cl.getInterfaces(); + Class[] interfaces = cl.getInterfaces(); Set s = new HashSet(interfaces.length); for (int i = 0; i < interfaces.length; i++) { s.add(interfaces[i].getName()); @@ -141,7 +141,7 @@ } Map, ClassLoader> getClassLoaderMap() { - return new HashMap(map); + return new HashMap<>(map); } } @@ -191,9 +191,9 @@ boolean hasNonPublicInterface = false; // define proxy in class loader of non-public interface(s), if any - Class[] classObjs = new Class[interfaces.length]; + Class[] classObjs = new Class[interfaces.length]; for (int i = 0; i < interfaces.length; i++) { - Class cl = Class.forName(interfaces[i], false, classLoader); + Class cl = Class.forName(interfaces[i], false, classLoader); if ((cl.getModifiers() & Modifier.PUBLIC) == 0) { if (hasNonPublicInterface) { if (nonPublicLoader != cl.getClassLoader()) {