PR: 27261 Obtained from: Mike Murray git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@276969 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -135,6 +135,9 @@ Fixed bugs: | |||||
| * NPE using XmlLogger and antlib. | * NPE using XmlLogger and antlib. | ||||
| Bugzilla report 31840. | 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 | Changes from Ant 1.6.1 to Ant 1.6.2 | ||||
| =================================== | =================================== | ||||
| @@ -266,7 +266,7 @@ public final class Diagnostics { | |||||
| * @param out the stream to print the properties to. | * @param out the stream to print the properties to. | ||||
| */ | */ | ||||
| private static void doReportSystemProperties(PrintStream out) { | private static void doReportSystemProperties(PrintStream out) { | ||||
| for (Enumeration keys = System.getProperties().keys(); | |||||
| for (Enumeration keys = System.getProperties().propertyNames(); | |||||
| keys.hasMoreElements();) { | keys.hasMoreElements();) { | ||||
| String key = (String) keys.nextElement(); | String key = (String) keys.nextElement(); | ||||
| out.println(key + " : " + System.getProperty(key)); | out.println(key + " : " + System.getProperty(key)); | ||||
| @@ -828,7 +828,7 @@ public class Project { | |||||
| */ | */ | ||||
| public void setSystemProperties() { | public void setSystemProperties() { | ||||
| Properties systemP = System.getProperties(); | Properties systemP = System.getProperties(); | ||||
| Enumeration e = systemP.keys(); | |||||
| Enumeration e = systemP.propertyNames(); | |||||
| while (e.hasMoreElements()) { | while (e.hasMoreElements()) { | ||||
| Object name = e.nextElement(); | Object name = e.nextElement(); | ||||
| String value = systemP.get(name).toString(); | String value = systemP.get(name).toString(); | ||||
| @@ -133,7 +133,7 @@ public class CommandlineJava implements Cloneable { | |||||
| try { | try { | ||||
| sys = System.getProperties(); | sys = System.getProperties(); | ||||
| Properties p = new Properties(); | Properties p = new Properties(); | ||||
| for (Enumeration e = sys.keys(); e.hasMoreElements();) { | |||||
| for (Enumeration e = sys.propertyNames(); e.hasMoreElements();) { | |||||
| Object o = e.nextElement(); | Object o = e.nextElement(); | ||||
| p.put(o, sys.get(o)); | p.put(o, sys.get(o)); | ||||
| } | } | ||||