ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: cvs commit: ant/src/main/org/apache/tools/ant PropertyHelper. java
Date Mon, 13 Sep 2004 05:57:40 GMT
ok, JDK doc sais "Since: 1.2".
Often a compilation on JDK 1.2 is forgotten I think :-)

Jan

> -----Urspr√ľngliche Nachricht-----
> Von: peterreilly@apache.org [mailto:peterreilly@apache.org]
> Gesendet am: Freitag, 10. September 2004 19:32
> An: ant-cvs@apache.org
> Betreff: cvs commit: ant/src/main/org/apache/tools/ant
> PropertyHelper.java
> 
> peterreilly    2004/09/10 10:31:50
> 
>   Modified:    src/main/org/apache/tools/ant PropertyHelper.java
>   Log:
>   use copy constructor Simplified copying of Hashtables in 
> propertyhelper.java
>   PR: 30163
>   Obtained from: Jesse Glick
>   
>   Revision  Changes    Path
>   1.17      +2 -21     
> ant/src/main/org/apache/tools/ant/PropertyHelper.java
>   
>   Index: PropertyHelper.java
>   ===================================================================
>   RCS file: 
> /home/cvs/ant/src/main/org/apache/tools/ant/PropertyHelper.java,v
>   retrieving revision 1.16
>   retrieving revision 1.17
>   diff -u -r1.16 -r1.17
>   --- PropertyHelper.java	3 Sep 2004 10:43:15 -0000	1.16
>   +++ PropertyHelper.java	10 Sep 2004 17:31:50 -0000	1.17
>   @@ -477,19 +477,9 @@
>         *         (including user properties).
>         */
>        public Hashtable getProperties() {
>   -        Hashtable propertiesCopy = new Hashtable();
>   -
>   -        Enumeration e = properties.keys();
>   -        while (e.hasMoreElements()) {
>   -            Object name = e.nextElement();
>   -            Object value = properties.get(name);
>   -            propertiesCopy.put(name, value);
>   -        }
>   -
>   +        return new Hashtable(properties);
>            // There is a better way to save the context. This 
> shouldn't
>            // delegate to next, it's for backward compatibility only.
>   -
>   -        return propertiesCopy;
>        }
>    
>        /**
>   @@ -497,16 +487,7 @@
>         * @return a hashtable containing just the user properties
>         */
>        public Hashtable getUserProperties() {
>   -        Hashtable propertiesCopy = new Hashtable();
>   -
>   -        Enumeration e = userProperties.keys();
>   -        while (e.hasMoreElements()) {
>   -            Object name = e.nextElement();
>   -            Object value = properties.get(name);
>   -            propertiesCopy.put(name, value);
>   -        }
>   -
>   -        return propertiesCopy;
>   +        return new Hashtable(userProperties);
>        }
>    
>        /**
>   
>   
>   
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message