--- a/jdk/src/share/classes/java/lang/ConditionalSpecialCasing.java Wed Dec 07 12:12:50 2011 -0800
+++ b/jdk/src/share/classes/java/lang/ConditionalSpecialCasing.java Thu Dec 08 13:48:54 2011 -0500
@@ -92,15 +92,15 @@
};
// A hash table that contains the above entries
- static Hashtable entryTable = new Hashtable();
+ static Hashtable<Integer, HashSet<Entry>> entryTable = new Hashtable<>();
static {
// create hashtable from the entry
for (int i = 0; i < entry.length; i ++) {
Entry cur = entry[i];
Integer cp = new Integer(cur.getCodePoint());
- HashSet set = (HashSet)entryTable.get(cp);
+ HashSet<Entry> set = entryTable.get(cp);
if (set == null) {
- set = new HashSet();
+ set = new HashSet<Entry>();
}
set.add(cur);
entryTable.put(cp, set);
@@ -151,13 +151,13 @@
}
private static char[] lookUpTable(String src, int index, Locale locale, boolean bLowerCasing) {
- HashSet set = (HashSet)entryTable.get(new Integer(src.codePointAt(index)));
+ HashSet<Entry> set = entryTable.get(new Integer(src.codePointAt(index)));
if (set != null) {
- Iterator iter = set.iterator();
+ Iterator<Entry> iter = set.iterator();
String currentLang = locale.getLanguage();
while (iter.hasNext()) {
- Entry entry = (Entry)iter.next();
+ Entry entry = iter.next();
String conditionLang= entry.getLanguage();
if (((conditionLang == null) || (conditionLang.equals(currentLang))) &&
isConditionMet(src, index, locale, entry.getCondition())) {