--- old/src/share/classes/sun/applet/AppletViewer.java 2014-01-21 16:51:27.000000000 -0800 +++ new/src/share/classes/sun/applet/AppletViewer.java 2014-01-21 16:51:27.000000000 -0800 @@ -35,7 +35,6 @@ import java.net.URL; import java.net.MalformedURLException; import java.net.SocketPermission; -import sun.misc.Ref; import java.security.AccessController; import java.security.PrivilegedAction; import java.lang.reflect.InvocationTargetException; @@ -390,22 +389,18 @@ return getCachedImage(url); } - static Image getCachedImage(URL url) { - // System.getSecurityManager().checkConnection(url.getHost(), url.getPort()); - return (Image)getCachedImageRef(url).get(); - } - /** - * Get an image ref. + * Get an image. */ - static Ref getCachedImageRef(URL url) { + static Image getCachedImage(URL url) { + // System.getSecurityManager().checkConnection(url.getHost(), url.getPort()); synchronized (imageRefs) { AppletImageRef ref = (AppletImageRef)imageRefs.get(url); if (ref == null) { ref = new AppletImageRef(url); imageRefs.put(url, ref); } - return ref; + return ref.get(); } }