commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@apache.org
Subject cvs commit: jakarta-commons/lang/src/java/org/apache/commons/lang/enum Enum.java
Date Tue, 04 Feb 2003 18:42:50 GMT
scolebourne    2003/02/04 10:42:50

  Modified:    lang/src/java/org/apache/commons/lang/enum Enum.java
  Log:
  Update Enum initial sizes for JDK1.2 and JDK1.3
  from Mike Bowler, bug fix 16690
  
  Revision  Changes    Path
  1.9       +6 -5      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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Enum.java	4 Feb 2003 18:30:07 -0000	1.8
  +++ Enum.java	4 Feb 2003 18:42:50 -0000	1.9
  @@ -198,6 +198,7 @@
    *
    * @author Stephen Colebourne
    * @author Chris Webb
  + * @author Mike Bowler
    * @since 1.0
    * @version $Id$
    */
  @@ -205,11 +206,11 @@
       /**
        * An empty map, as JDK1.2 didn't have an empty map
        */
  -    private static final Map EMPTY_MAP = Collections.unmodifiableMap(new HashMap());
  +    private static final Map EMPTY_MAP = Collections.unmodifiableMap(new HashMap(1));
       /**
        * Map, key of class name, value of Entry.
        */
  -    private static final Map cEnumClasses = new HashMap();
  +    private static final Map cEnumClasses = new HashMap(61);
       /**
        * The string representation of the Enum.
        */
  @@ -220,7 +221,7 @@
        */
       private static class Entry {
           /** Map of Enum name to Enum */
  -        final Map map = new HashMap(50);
  +        final Map map = new HashMap(61);
           /** List of Enums in source code order */
           final List list = new ArrayList(25);
   
  @@ -240,7 +241,7 @@
       protected Enum(String name) {
           super();
           if (name == null || name.length() == 0) {
  -            throw new IllegalArgumentException("The Enum name must not be empty");
  +            throw new IllegalArgumentException("The Enum name must not be empty or null");
           }
           iName = name;
           Class enumClass = Enum.getEnumClass(getClass());
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message