ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgl...@apache.org
Subject svn commit: r1328028 - in /ant/core/trunk/src/main/org/apache/tools/ant: Target.java TaskConfigurationChecker.java helper/ProjectHelper2.java
Date Thu, 19 Apr 2012 16:19:14 GMT
Author: jglick
Date: Thu Apr 19 16:19:13 2012
New Revision: 1328028

URL: http://svn.apache.org/viewvc?rev=1328028&view=rev
Log:
JDK 5.

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/Target.java
    ant/core/trunk/src/main/org/apache/tools/ant/TaskConfigurationChecker.java
    ant/core/trunk/src/main/org/apache/tools/ant/helper/ProjectHelper2.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/Target.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/Target.java?rev=1328028&r1=1328027&r2=1328028&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/Target.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/Target.java Thu Apr 19 16:19:13 2012
@@ -135,10 +135,10 @@ public class Target implements TaskConta
         }
     }
 
-    public static List/*<String>*/ parseDepends(String depends,
+    public static List<String> parseDepends(String depends,
                                                 String targetName,
                                                 String attributeName) {
-        ArrayList list = new ArrayList();
+        List<String> list = new ArrayList<String>();
         if (depends.length() > 0) {
             StringTokenizer tok =
                 new StringTokenizer(depends, ",", true);

Modified: ant/core/trunk/src/main/org/apache/tools/ant/TaskConfigurationChecker.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/TaskConfigurationChecker.java?rev=1328028&r1=1328027&r2=1328028&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/TaskConfigurationChecker.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/TaskConfigurationChecker.java Thu Apr 19
16:19:13 2012
@@ -18,7 +18,6 @@
 package org.apache.tools.ant;
 
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
 
 /**
@@ -56,7 +55,7 @@ import java.util.List;
 public class TaskConfigurationChecker {
 
     /** List of all collected error messages. */
-    private List/*<String>*/ errors = new ArrayList();
+    private List<String> errors = new ArrayList<String>();
 
     /** Task for which the configuration should be checked. */
     private final Task task;
@@ -100,8 +99,7 @@ public class TaskConfigurationChecker {
             sb.append(task.getTaskName());
             sb.append(">:");
             sb.append(System.getProperty("line.separator"));
-            for (Iterator it = errors.iterator(); it.hasNext();) {
-                String msg = (String) it.next();
+            for (String msg : errors) {
                 sb.append("- ");
                 sb.append(msg);
                 sb.append(System.getProperty("line.separator"));

Modified: ant/core/trunk/src/main/org/apache/tools/ant/helper/ProjectHelper2.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/helper/ProjectHelper2.java?rev=1328028&r1=1328027&r2=1328028&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/helper/ProjectHelper2.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/helper/ProjectHelper2.java Thu Apr 19 16:19:13
2012
@@ -1035,11 +1035,7 @@ public class ProjectHelper2 extends Proj
                 ProjectHelper helper =
                     (ProjectHelper) context.getProject().
                     getReference(ProjectHelper.PROJECTHELPER_REFERENCE);
-                for (Iterator iter =
-                         Target.parseDepends(extensionPoint, name, "extensionOf")
-                         .iterator();
-                     iter.hasNext(); ) {
-                    String tgName = (String) iter.next();
+                for (String tgName : Target.parseDepends(extensionPoint, name, "extensionOf"))
{
                     if (isInIncludeMode()) {
                         tgName = prefix + sep + tgName;
                     }



Mime
View raw message