Modifying these classes to use the JDK 1.2 WeakHashMap constructors as that is all we need to maintain JDK 1.2 compatibility
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@637362 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c7b0550bbb
commit
986e79355c
|
@ -360,7 +360,8 @@ public abstract class Enum implements Comparable, Serializable {
|
|||
entry = (Entry) cEnumClasses.get(enumClass);
|
||||
if (entry == null) {
|
||||
entry = createEntry(enumClass);
|
||||
Map myMap = new WeakHashMap( cEnumClasses );
|
||||
Map myMap = new WeakHashMap( ); // we avoid the (Map) constructor to achieve JDK 1.2 support
|
||||
myMap.putAll( cEnumClasses );
|
||||
myMap.put(enumClass, entry);
|
||||
cEnumClasses = myMap;
|
||||
}
|
||||
|
|
|
@ -406,7 +406,8 @@ public abstract class Enum implements Comparable, Serializable {
|
|||
entry = (Entry) cEnumClasses.get(enumClass);
|
||||
if (entry == null) {
|
||||
entry = createEntry(enumClass);
|
||||
Map myMap = new WeakHashMap( cEnumClasses );
|
||||
Map myMap = new WeakHashMap( ); // we avoid the (Map) constructor to achieve JDK 1.2 support
|
||||
myMap.putAll( cEnumClasses );
|
||||
myMap.put(enumClass, entry);
|
||||
cEnumClasses = myMap;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue