ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject svn commit: r593021 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Retry.java
Date Thu, 08 Nov 2007 05:43:18 GMT
Author: kevj
Date: Wed Nov  7 21:43:14 2007
New Revision: 593021

URL: http://svn.apache.org/viewvc?rev=593021&view=rev
Log:
-use StringUtils

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Retry.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Retry.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Retry.java?rev=593021&r1=593020&r2=593021&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Retry.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Retry.java Wed Nov  7 21:43:14 2007
@@ -21,6 +21,7 @@
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.Task;
 import org.apache.tools.ant.TaskContainer;
+import org.apache.tools.ant.util.StringUtils;
 
 /**
  * Retries the nested task a set number of times
@@ -65,7 +66,6 @@
      */
     public void execute() throws BuildException {
         StringBuffer errorMessages = new StringBuffer();
-        String br = getProject().getProperty("line.separator");
         for (int i = 0; i <= retryCount; i++) {
             try {
                 nestedTask.perform();
@@ -76,13 +76,13 @@
                     StringBuffer exceptionMessage = new StringBuffer();
                     exceptionMessage.append("Task [").append(nestedTask.getTaskName());
                     exceptionMessage.append("] failed after [").append(retryCount);
-                    exceptionMessage.append("] attempts; giving up.").append(br);
-                    exceptionMessage.append("Error messages:").append(br);
+                    exceptionMessage.append("] attempts; giving up.").append(StringUtils.LINE_SEP);
+                    exceptionMessage.append("Error messages:").append(StringUtils.LINE_SEP);
                     exceptionMessage.append(errorMessages);
                     throw new BuildException(exceptionMessage.toString(), getLocation());
                 }
-                log("Attempt [" + i + "]:  error occurred; retrying...", e, Project.MSG_INFO);
-                errorMessages.append(br);
+                log("Attempt [" + i + "]: error occurred; retrying...", e, Project.MSG_INFO);
+                errorMessages.append(StringUtils.LINE_SEP);
             }
         }
     }



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


Mime
View raw message