ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <DDevie...@lgc.com>
Subject RE: cvs commit: ant/src/main/org/apache/tools/ant IntrospectionHelper.java
Date Mon, 13 Sep 2004 13:26:57 GMT
Sorry about that. Note though that the test uses EMPTY_MAP too. Instead
of having a private EMPTY_MAP in IH, we probably need a public one in
o.a.t.a.util.CollectionUtil or something similar. --DD

> -----Original Message-----
> From: peterreilly@apache.org [mailto:peterreilly@apache.org]
> Sent: Monday, September 13, 2004 4:12 AM
> To: ant-cvs@apache.org
> Subject: cvs commit: ant/src/main/org/apache/tools/ant
> IntrospectionHelper.java
> 
> peterreilly    2004/09/13 02:11:47
> 
>   Modified:    src/main/org/apache/tools/ant IntrospectionHelper.java
>   Log:
>   make IntrospectionHelper compile under jdk1.2.2
> 
>   Revision  Changes    Path
>   1.89      +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.88
>   retrieving revision 1.89
>   diff -u -r1.88 -r1.89
>   --- IntrospectionHelper.java	8 Sep 2004 11:32:06 -0000
1.88
>   +++ IntrospectionHelper.java	13 Sep 2004 09:11:47 -0000
1.89
>   @@ -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

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


Mime
View raw message