Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 35132 invoked from network); 13 Sep 2004 05:57:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 13 Sep 2004 05:57:51 -0000 Received: (qmail 66530 invoked by uid 500); 13 Sep 2004 05:57:49 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 66320 invoked by uid 500); 13 Sep 2004 05:57:48 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 66306 invoked by uid 99); 13 Sep 2004 05:57:48 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=HTML_60_70,HTML_MESSAGE,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [193.109.238.66] (HELO dnsinet.rzf-nrw.de) (193.109.238.66) by apache.org (qpsmtpd/0.28) with ESMTP; Sun, 12 Sep 2004 22:57:46 -0700 Received: from z011104.bk.fin.local (z011104.bk.fin.local [193.109.238.140]) by dnsinet.rzf-nrw.de (8.12.10/8.12.10) with ESMTP id i8D5vfvR029821 for ; Mon, 13 Sep 2004 07:57:41 +0200 Received: by z011104.bk.fin.local with Internet Mail Service (5.5.2657.72) id ; Mon, 13 Sep 2004 07:57:42 +0200 Message-ID: <879A5AD5DD0ED511891F0003473A9B560E23F5B8@Z011004> From: Jan.Materne@rzf.fin-nrw.de To: dev@ant.apache.org Subject: AW: cvs commit: ant/src/main/org/apache/tools/ant PropertyHelper. java Date: Mon, 13 Sep 2004 07:57:40 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C49956.94525F40" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C49956.94525F40 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable ok, JDK doc sais "Since: 1.2". Often a compilation on JDK 1.2 is forgotten I think :-) Jan > -----Urspr=FCngliche 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 >=20 > peterreilly 2004/09/10 10:31:50 >=20 > Modified: src/main/org/apache/tools/ant PropertyHelper.java > Log: > use copy constructor Simplified copying of Hashtables in=20 > propertyhelper.java > PR: 30163 > Obtained from: Jesse Glick > =20 > Revision Changes Path > 1.17 +2 -21 =20 > ant/src/main/org/apache/tools/ant/PropertyHelper.java > =20 > Index: PropertyHelper.java > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file:=20 > /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 =3D new Hashtable(); > - > - Enumeration e =3D properties.keys(); > - while (e.hasMoreElements()) { > - Object name =3D e.nextElement(); > - Object value =3D properties.get(name); > - propertiesCopy.put(name, value); > - } > - > + return new Hashtable(properties); > // There is a better way to save the context. This=20 > shouldn't > // delegate to next, it's for backward compatibility only. > - > - return propertiesCopy; > } > =20 > /** > @@ -497,16 +487,7 @@ > * @return a hashtable containing just the user properties > */ > public Hashtable getUserProperties() { > - Hashtable propertiesCopy =3D new Hashtable(); > - > - Enumeration e =3D userProperties.keys(); > - while (e.hasMoreElements()) { > - Object name =3D e.nextElement(); > - Object value =3D properties.get(name); > - propertiesCopy.put(name, value); > - } > - > - return propertiesCopy; > + return new Hashtable(userProperties); > } > =20 > /** > =20 > =20 > =20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org > For additional commands, e-mail: dev-help@ant.apache.org >=20 ------_=_NextPart_001_01C49956.94525F40--