src/share/classes/sun/applet/AppletImageRef.java

Print this page
rev 10175 : 8042872: Fix raw and unchecked warnings in sun.applet
Reviewed-by:

@@ -63,22 +63,22 @@
     /**
      * Flushes the cached object.  Forces the next invocation of get() to
      * invoke reconstitute().
      */
     public synchronized void flush() {
-        SoftReference s = soft;
+        SoftReference<Image> s = soft;
         if (s != null) s.clear();
         soft = null;
     }
 
     /**
      * Sets the thing to the specified object.
      * @param thing the specified object
      */
-    public synchronized void setThing(Object thing) {
+    public synchronized void setThing(Image thing) {
         flush();
-        soft = new SoftReference(thing);
+        soft = new SoftReference<>(thing);
     }
 
     /**
      * Checks to see what object is being pointed at by this Ref and returns it.
      */