src/share/classes/sun/awt/AppContext.java

Print this page
rev 9717 : 8039642: Fix raw and unchecked warnings in sun.awt.*
Reviewed-by:

@@ -888,10 +888,11 @@
 
     public static <T> T getSoftReferenceValue(Object key,
             Supplier<T> supplier) {
 
         final AppContext appContext = AppContext.getAppContext();
+        @SuppressWarnings("unchecked")
         SoftReference<T> ref = (SoftReference<T>) appContext.get(key);
         if (ref != null) {
             final T object = ref.get();
             if (object != null) {
                 return object;