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 Wed, 30 Oct 2002 21:58:18 GMT
scolebourne    2002/10/30 13:58:18

  Modified:    lang/src/java/org/apache/commons/lang/enum Enum.java
  Log:
  Fix to be JDK1.2 compliant
  
  Revision  Changes    Path
  1.3       +6 -2      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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Enum.java	31 Aug 2002 10:51:02 -0000	1.2
  +++ Enum.java	30 Oct 2002 21:58:18 -0000	1.3
  @@ -119,6 +119,10 @@
    */
   public abstract class Enum implements Comparable, Serializable {
       /**
  +     * An empty map, as JDK1.2 didn't have an empty map
  +     */
  +    private static final Map EMPTY_MAP = Collections.unmodifiableMap(new HashMap());
  +    /**
        * Map, key of class name, value of Entry.
        */
       private static final Map cEnumClasses = new HashMap();
  @@ -210,7 +214,7 @@
           }
           Entry entry = (Entry) cEnumClasses.get(enumClass.getName());
           if (entry == null) {
  -            return Collections.EMPTY_MAP;
  +            return EMPTY_MAP;
           }
           return Collections.unmodifiableMap(entry.map);
       }
  
  
  

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


Mime
View raw message