1.1 --- a/rt/emul/compact/src/main/java/java/lang/ClassValue.java Sun Aug 10 05:55:55 2014 +0200
1.2 +++ b/rt/emul/compact/src/main/java/java/lang/ClassValue.java Sun Aug 10 07:02:12 2014 +0200
1.3 @@ -186,7 +186,7 @@
1.4 /** Return the cache, if it exists, else a dummy empty cache. */
1.5 private static Entry<?>[] getCacheCarefully(Class<?> type) {
1.6 // racing type.classValueMap{.cacheArray} : null => new Entry[X] <=> new Entry[Y]
1.7 - ClassValueMap map = type.classValueMap;
1.8 + ClassValueMap map = (ClassValueMap) type.classValueMap;
1.9 if (map == null) return EMPTY_CACHE;
1.10 Entry<?>[] cache = map.getCache();
1.11 return cache;
1.12 @@ -364,7 +364,7 @@
1.13 // racing type.classValueMap : null (blank) => unique ClassValueMap
1.14 // if a null is observed, a map is created (lazily, synchronously, uniquely)
1.15 // all further access to that map is synchronized
1.16 - ClassValueMap map = type.classValueMap;
1.17 + ClassValueMap map = (ClassValueMap)type.classValueMap;
1.18 if (map != null) return map;
1.19 return initializeMap(type);
1.20 }
1.21 @@ -374,7 +374,7 @@
1.22 ClassValueMap map;
1.23 synchronized (CRITICAL_SECTION) { // private object to avoid deadlocks
1.24 // happens about once per type
1.25 - if ((map = type.classValueMap) == null)
1.26 + if ((map = (ClassValueMap)type.classValueMap) == null)
1.27 type.classValueMap = map = new ClassValueMap(type);
1.28 }
1.29 return map;