summaryrefslogtreecommitdiff
path: root/src/main/org/apache/tools/ant/taskdefs/Sleep.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/org/apache/tools/ant/taskdefs/Sleep.java')
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/Sleep.java19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/main/org/apache/tools/ant/taskdefs/Sleep.java b/src/main/org/apache/tools/ant/taskdefs/Sleep.java
index 6468c3901..5a59c1925 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Sleep.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Sleep.java
@@ -64,15 +64,12 @@ public class Sleep extends Task {
*/
private int milliseconds = 0;
-
-
/**
* Creates new instance
*/
public Sleep() {
}
-
/**
* seconds to add to the sleep time
*
@@ -82,7 +79,6 @@ public class Sleep extends Task {
this.seconds = seconds;
}
-
/**
* hours to add to the sleep time.
*
@@ -92,7 +88,6 @@ public class Sleep extends Task {
this.hours = hours;
}
-
/**
* minutes to add to the sleep time
*
@@ -102,7 +97,6 @@ public class Sleep extends Task {
this.minutes = minutes;
}
-
/**
* milliseconds to add to the sleep time
*
@@ -112,7 +106,6 @@ public class Sleep extends Task {
this.milliseconds = milliseconds;
}
-
/**
* sleep for a period of time
*
@@ -126,7 +119,6 @@ public class Sleep extends Task {
}
}
-
/**
* flag controlling whether to break the build on an error.
*
@@ -136,7 +128,6 @@ public class Sleep extends Task {
this.failOnError = failOnError;
}
-
/**
* return time to sleep
*
@@ -150,7 +141,6 @@ public class Sleep extends Task {
// CheckStyle:MagicNumber ON
}
-
/**
* verify parameters
*
@@ -159,12 +149,10 @@ public class Sleep extends Task {
public void validate()
throws BuildException {
if (getSleepTime() < 0) {
- throw new BuildException("Negative sleep periods are not "
- + "supported");
+ throw new BuildException("Negative sleep periods are not supported");
}
}
-
/**
* Executes this build task. Throws org.apache.tools.ant.BuildException
* if there is an error during task execution.
@@ -183,12 +171,9 @@ public class Sleep extends Task {
} catch (Exception e) {
if (failOnError) {
throw new BuildException(e);
- } else {
- String text = e.toString();
- log(text, Project.MSG_ERR);
}
+ log(e.toString(), Project.MSG_ERR);
}
}
}
-