--- old/src/share/classes/javax/swing/PopupFactory.java 2014-06-30 09:09:30.000000000 -0700
+++ new/src/share/classes/javax/swing/PopupFactory.java 2014-06-30 09:09:30.000000000 -0700
@@ -401,13 +401,14 @@
* Window
to a List
of
* HeavyWeightPopup
s.
*/
+ @SuppressWarnings("unchecked")
private static Map> getHeavyWeightPopupCache() {
synchronized (HeavyWeightPopup.class) {
Map> cache = (Map>)SwingUtilities.appContextGet(
heavyWeightPopupCacheKey);
if (cache == null) {
- cache = new HashMap>(2);
+ cache = new HashMap<>(2);
SwingUtilities.appContextPut(heavyWeightPopupCacheKey,
cache);
}
@@ -698,11 +699,12 @@
/**
* Returns the cache to use for heavy weight popups.
*/
+ @SuppressWarnings("unchecked")
private static List getLightWeightPopupCache() {
List cache = (List)SwingUtilities.appContextGet(
lightWeightPopupCacheKey);
if (cache == null) {
- cache = new ArrayList();
+ cache = new ArrayList<>();
SwingUtilities.appContextPut(lightWeightPopupCacheKey, cache);
}
return cache;
@@ -854,12 +856,13 @@
/**
* Returns the cache to use for medium weight popups.
*/
+ @SuppressWarnings("unchecked")
private static List getMediumWeightPopupCache() {
List cache = (List)SwingUtilities.appContextGet(
mediumWeightPopupCacheKey);
if (cache == null) {
- cache = new ArrayList();
+ cache = new ArrayList<>();
SwingUtilities.appContextPut(mediumWeightPopupCacheKey, cache);
}
return cache;