ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant IntrospectionHelper.java
Date Mon, 13 Sep 2004 09:12:29 GMT
peterreilly    2004/09/13 02:12:29

  Modified:    src/main/org/apache/tools/ant Tag: ANT_16_BRANCH
                        IntrospectionHelper.java
  Log:
  sync
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.65.2.18 +10 -2     ant/src/main/org/apache/tools/ant/IntrospectionHelper.java
  
  Index: IntrospectionHelper.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/IntrospectionHelper.java,v
  retrieving revision 1.65.2.17
  retrieving revision 1.65.2.18
  diff -u -r1.65.2.17 -r1.65.2.18
  --- IntrospectionHelper.java	23 Aug 2004 13:42:42 -0000	1.65.2.17
  +++ IntrospectionHelper.java	13 Sep 2004 09:12:29 -0000	1.65.2.18
  @@ -25,6 +25,7 @@
   import java.util.Collections;
   import java.util.Enumeration;
   import java.util.Hashtable;
  +import java.util.HashMap;
   import java.util.List;
   import java.util.Locale;
   import java.util.Map;
  @@ -40,6 +41,13 @@
   public final class IntrospectionHelper implements BuildListener {
   
       /**
  +     * EMPTY_MAP was added in java 1.3 (EMTPY_SET and EMPTY_LIST
  +     * is in java 1.2!)
  +     */
  +    private static final Map EMPTY_MAP = Collections.unmodifiableMap(
  +        new HashMap());
  +
  +    /**
        * Map from attribute names to attribute types
        * (String to Class).
        */
  @@ -942,7 +950,7 @@
        */
       public Map getAttributeMap() {
           if (attributeTypes.size() < 1) {
  -            return Collections.EMPTY_MAP;
  +            return EMPTY_MAP;
           }
           return Collections.unmodifiableMap(attributeTypes);
       }
  @@ -969,7 +977,7 @@
        */
       public Map getNestedElementMap() {
           if (nestedTypes.size() < 1) {
  -            return Collections.EMPTY_MAP;
  +            return EMPTY_MAP;
           }
           return Collections.unmodifiableMap(nestedTypes);
       }
  
  
  

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


Mime
View raw message