diff options
author | Mark Donszelmann <Mark.Donszelmann@gmail.com> | 2009-11-27 14:33:32 +0100 |
---|---|---|
committer | Mark Donszelmann <Mark.Donszelmann@gmail.com> | 2009-11-27 14:33:32 +0100 |
commit | 97c4b6bd774960fe9301829cf2d1ac23882e8958 (patch) | |
tree | 90932a84a98f9243c70fb9f1d32aefc0cf93a200 /src/main/java/net/sf/antcontrib/cpptasks | |
parent | 836ecd4574bcd7f0db9b32ee2f64db8bb466a057 (diff) | |
download | cpptasks-parallel-97c4b6bd774960fe9301829cf2d1ac23882e8958.tar.gz cpptasks-parallel-97c4b6bd774960fe9301829cf2d1ac23882e8958.tar.bz2 cpptasks-parallel-97c4b6bd774960fe9301829cf2d1ac23882e8958.tar.xz cpptasks-parallel-97c4b6bd774960fe9301829cf2d1ac23882e8958.zip |
Fixed test for NAR-109
Diffstat (limited to 'src/main/java/net/sf/antcontrib/cpptasks')
-rw-r--r-- | src/main/java/net/sf/antcontrib/cpptasks/CCTask.java | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/main/java/net/sf/antcontrib/cpptasks/CCTask.java b/src/main/java/net/sf/antcontrib/cpptasks/CCTask.java index 62a8e6d..fec91af 100644 --- a/src/main/java/net/sf/antcontrib/cpptasks/CCTask.java +++ b/src/main/java/net/sf/antcontrib/cpptasks/CCTask.java @@ -21,6 +21,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Comparator; import java.util.Enumeration; +import java.util.HashMap; import java.util.Hashtable; import java.util.Iterator; import java.util.List; @@ -173,8 +174,8 @@ public class CCTask extends Task { * Builds a Hashtable to targets needing to be rebuilt keyed by compiler * configuration */ - public static Hashtable getTargetsToBuildByConfiguration(Map targets) { - Hashtable targetsByConfig = new Hashtable(); + public static Map getTargetsToBuildByConfiguration(Map targets) { + Map targetsByConfig = new HashMap(); Iterator targetEnum = targets.values().iterator(); while (targetEnum.hasNext()) { TargetInfo target = (TargetInfo) targetEnum.next(); @@ -688,17 +689,17 @@ public class CCTask extends Task { // // compile all targets with getRebuild() == true // - Hashtable targetsByConfig = getTargetsToBuildByConfiguration(targets); + Map targetsByConfig = getTargetsToBuildByConfiguration(targets); // // build array containing Vectors with precompiled generation // steps going first // Vector[] targetVectors = new Vector[targetsByConfig.size()]; int index = 0; - Enumeration targetVectorEnum = targetsByConfig.elements(); - while (targetVectorEnum.hasMoreElements()) { + Iterator targetVectorEnum = targetsByConfig.values().iterator(); + while (targetVectorEnum.hasNext()) { Vector targetsForConfig = (Vector) targetVectorEnum - .nextElement(); + .next(); // // get the configuration from the first entry // @@ -708,10 +709,10 @@ public class CCTask extends Task { targetVectors[index++] = targetsForConfig; } } - targetVectorEnum = targetsByConfig.elements(); - while (targetVectorEnum.hasMoreElements()) { + targetVectorEnum = targetsByConfig.values().iterator(); + while (targetVectorEnum.hasNext()) { Vector targetsForConfig = (Vector) targetVectorEnum - .nextElement(); + .next(); for (int i = 0; i < targetVectors.length; i++) { if (targetVectors[i] == targetsForConfig) { break; |