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/types CommandlineJava.java
Date Thu, 28 Oct 2004 08:47:26 GMT
peterreilly    2004/10/28 01:47:26

  Modified:    .        WHATSNEW
               src/main/org/apache/tools/ant Project.java Diagnostics.java
               src/main/org/apache/tools/ant/types CommandlineJava.java
  Log:
  Properties.propertyNames() should be used instead of .keys().
  PR: 27261
  Obtained from: Mike Murray
  
  Revision  Changes    Path
  1.678     +3 -0      ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.677
  retrieving revision 1.678
  diff -u -r1.677 -r1.678
  --- WHATSNEW	27 Oct 2004 12:48:35 -0000	1.677
  +++ WHATSNEW	28 Oct 2004 08:47:26 -0000	1.678
  @@ -135,6 +135,9 @@
   * NPE using XmlLogger and antlib.
     Bugzilla report 31840.
   
  +* Properties.propertyNames() should be used instead of .keys().
  +  Bugzilla report 27261.
  +
   Changes from Ant 1.6.1 to Ant 1.6.2
   ===================================
   
  
  
  
  1.175     +2 -2      ant/src/main/org/apache/tools/ant/Project.java
  
  Index: Project.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/Project.java,v
  retrieving revision 1.174
  retrieving revision 1.175
  diff -u -r1.174 -r1.175
  --- Project.java	2 Sep 2004 07:51:33 -0000	1.174
  +++ Project.java	28 Oct 2004 08:47:26 -0000	1.175
  @@ -828,7 +828,7 @@
        */
       public void setSystemProperties() {
           Properties systemP = System.getProperties();
  -        Enumeration e = systemP.keys();
  +        Enumeration e = systemP.propertyNames();
           while (e.hasMoreElements()) {
               Object name = e.nextElement();
               String value = systemP.get(name).toString();
  
  
  
  1.15      +1 -1      ant/src/main/org/apache/tools/ant/Diagnostics.java
  
  Index: Diagnostics.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/Diagnostics.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Diagnostics.java	9 Mar 2004 16:47:59 -0000	1.14
  +++ Diagnostics.java	28 Oct 2004 08:47:26 -0000	1.15
  @@ -266,7 +266,7 @@
        * @param out the stream to print the properties to.
        */
       private static void doReportSystemProperties(PrintStream out) {
  -        for (Enumeration keys = System.getProperties().keys();
  +        for (Enumeration keys = System.getProperties().propertyNames();
               keys.hasMoreElements();) {
               String key = (String) keys.nextElement();
               out.println(key + " : " + System.getProperty(key));
  
  
  
  1.57      +1 -1      ant/src/main/org/apache/tools/ant/types/CommandlineJava.java
  
  Index: CommandlineJava.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/CommandlineJava.java,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- CommandlineJava.java	7 Oct 2004 10:59:45 -0000	1.56
  +++ CommandlineJava.java	28 Oct 2004 08:47:26 -0000	1.57
  @@ -133,7 +133,7 @@
               try {
                   sys = System.getProperties();
                   Properties p = new Properties();
  -                for (Enumeration e = sys.keys(); e.hasMoreElements();) {
  +                for (Enumeration e = sys.propertyNames(); e.hasMoreElements();) {
                       Object o = e.nextElement();
                       p.put(o, sys.get(o));
                   }
  
  
  

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


Mime
View raw message