Browse Source

Cosmetics

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@272400 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 23 years ago
parent
commit
2d446f3df2
4 changed files with 17 additions and 9 deletions
  1. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/Sequential.java
  2. +10
    -5
      src/main/org/apache/tools/ant/taskdefs/SignJar.java
  3. +5
    -3
      src/main/org/apache/tools/ant/taskdefs/Sleep.java
  4. +1
    -0
      src/main/org/apache/tools/ant/taskdefs/StreamPumper.java

+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/Sequential.java View File

@@ -66,7 +66,7 @@ import java.util.Enumeration;
* Implements a single threaded task execution.
* <p>
* @author Thomas Christen <a href="mailto:chr@active.ch">chr@active.ch</a>
*
* @since Ant 1.4
* @ant.task category="control"
*/
public class Sequential extends Task


+ 10
- 5
src/main/org/apache/tools/ant/taskdefs/SignJar.java View File

@@ -71,7 +71,7 @@ import org.apache.tools.ant.types.FileSet;
*
* @author Peter Donald <a href="mailto:donaldp@apache.org">donaldp@apache.org</a>
* @author Nick Fortescue <a href="mailto:nick@ox.compsoc.net">nick@ox.compsoc.net</a>
*
* @since Ant 1.1
* @ant.task category="java"
*/
public class SignJar extends Task {
@@ -160,6 +160,7 @@ public class SignJar extends Task {

/**
* Adds a set of files (nested fileset attribute).
* @since Ant 1.4
*/
public void addFileset(final FileSet set) {
filesets.addElement(set);
@@ -168,7 +169,8 @@ public class SignJar extends Task {

public void execute() throws BuildException {
if (null == jar && null == filesets) {
throw new BuildException("jar must be set through jar attribute or nested filesets");
throw new BuildException("jar must be set through jar attribute "
+ "or nested filesets");
}
if( null != jar ) {
doOneJar(jar, signedjar);
@@ -182,15 +184,18 @@ public class SignJar extends Task {
DirectoryScanner ds = fs.getDirectoryScanner(project);
String[] jarFiles = ds.getIncludedFiles();
for(int j=0; j<jarFiles.length; j++) {
doOneJar( new File( fs.getDir(project), jarFiles[j] ), null);
doOneJar( new File( fs.getDir(project), jarFiles[j] ),
null);
}
}
}
}

private void doOneJar(File jarSource, File jarTarget) throws BuildException {
private void doOneJar(File jarSource, File jarTarget)
throws BuildException {
if (Project.getJavaVersion().equals(Project.JAVA_1_1)) {
throw new BuildException("The signjar task is only available on JDK versions 1.2 or greater");
throw new BuildException("The signjar task is only available on "
+ "JDK versions 1.2 or greater");
}

if (null == alias) {


+ 5
- 3
src/main/org/apache/tools/ant/taskdefs/Sleep.java View File

@@ -62,7 +62,7 @@ import org.apache.tools.ant.BuildException;
* A task to sleep for a period of time
*
* @author steve_l@iseran.com steve loughran
*
* @since Ant 1.4
* @ant.task category="utility"
*/

@@ -169,7 +169,8 @@ public class Sleep extends Task {
*/

private long getSleepTime() {
return ((((long) hours * 60) + minutes) * 60 + seconds) * 1000 + milliseconds;
return ((((long) hours * 60) + minutes) * 60 + seconds) * 1000
+ milliseconds;
}


@@ -181,7 +182,8 @@ 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");
}
}



+ 1
- 0
src/main/org/apache/tools/ant/taskdefs/StreamPumper.java View File

@@ -62,6 +62,7 @@ import java.io.OutputStream;
* Copies all data from an input stream to an output stream.
*
* @author thomas.haas@softwired-inc.com
* @since Ant 1.2
*/
public class StreamPumper implements Runnable {



Loading…
Cancel
Save