scolebourne    2003/02/06 12:13:07

  Modified:    lang/src/java/org/apache/commons/lang/enum Enum.java
  Log:
  Use default HashMap sizes as this is better across JDK versions
  
  Revision  Changes    Path
  1.10      +7 -4      
jakarta-commons/lang/src/java/org/apache/commons/lang/enum/Enum.java
  
  Index: Enum.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/enum/Enum.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Enum.java 4 Feb 2003 18:42:50 -0000       1.9
  +++ Enum.java 6 Feb 2003 20:13:07 -0000       1.10
  @@ -203,14 +203,17 @@
    * @version $Id$
    */
   public abstract class Enum implements Comparable, Serializable {
  +    // After discussion, the default size for HashMaps is used, as the
  +    // sizing algorithm changes across the JDK versions
  +    
       /**
        * An empty map, as JDK1.2 didn't have an empty map
        */
  -    private static final Map EMPTY_MAP = Collections.unmodifiableMap(new 
HashMap(1));
  +    private static final Map EMPTY_MAP = Collections.unmodifiableMap(new 
HashMap(0));
       /**
        * Map, key of class name, value of Entry.
        */
  -    private static final Map cEnumClasses = new HashMap(61);
  +    private static final Map cEnumClasses = new HashMap();
       /**
        * The string representation of the Enum.
        */
  @@ -221,7 +224,7 @@
        */
       private static class Entry {
           /** Map of Enum name to Enum */
  -        final Map map = new HashMap(61);
  +        final Map map = new HashMap();
           /** List of Enums in source code order */
           final List list = new ArrayList(25);
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to