commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r637362 - in /commons/proper/lang/trunk/src/java/org/apache/commons/lang: enum/Enum.java enums/Enum.java
Date Sat, 15 Mar 2008 06:09:42 GMT
Author: bayard
Date: Fri Mar 14 23:09:41 2008
New Revision: 637362

URL: http://svn.apache.org/viewvc?rev=637362&view=rev
Log:
Modifying these classes to use the JDK 1.2 WeakHashMap constructors as that is all we need
to maintain JDK 1.2 compatibility

Modified:
    commons/proper/lang/trunk/src/java/org/apache/commons/lang/enum/Enum.java
    commons/proper/lang/trunk/src/java/org/apache/commons/lang/enums/Enum.java

Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/enum/Enum.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/enum/Enum.java?rev=637362&r1=637361&r2=637362&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/java/org/apache/commons/lang/enum/Enum.java (original)
+++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/enum/Enum.java Fri Mar 14 23:09:41
2008
@@ -360,7 +360,8 @@
             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;
             }

Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/enums/Enum.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/enums/Enum.java?rev=637362&r1=637361&r2=637362&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/java/org/apache/commons/lang/enums/Enum.java (original)
+++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/enums/Enum.java Fri Mar 14
23:09:41 2008
@@ -406,7 +406,8 @@
             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;
             }



Mime
View raw message