--- a/jdk/src/share/classes/java/text/NumberFormat.java Thu May 24 10:20:28 2012 -0400
+++ b/jdk/src/share/classes/java/text/NumberFormat.java Thu May 24 19:00:16 2012 -0700
@@ -756,7 +756,7 @@
}
/* try the cache first */
- String[] numberPatterns = (String[])cachedLocaleData.get(desiredLocale);
+ String[] numberPatterns = cachedLocaleData.get(desiredLocale);
if (numberPatterns == null) { /* cache miss */
ResourceBundle resource = LocaleData.getNumberFormatData(desiredLocale);
numberPatterns = resource.getStringArray("NumberPatterns");
@@ -844,7 +844,7 @@
/**
* Cache to hold the NumberPatterns of a Locale.
*/
- private static final Hashtable cachedLocaleData = new Hashtable(3);
+ private static final Hashtable<Locale, String[]> cachedLocaleData = new Hashtable<>(3);
// Constants used by factory methods to specify a style of format.
private static final int NUMBERSTYLE = 0;
@@ -1035,7 +1035,7 @@
private static final long serialVersionUID = 7494728892700160890L;
// table of all instances in this class, used by readResolve
- private static final Map instanceMap = new HashMap(11);
+ private static final Map<String, Field> instanceMap = new HashMap<>(11);
/**
* Creates a Field instance with the specified