Browse Source

setFile(File) has been replaced with setFile(SrcFile). No backwards

compatibilty issues here as task was introduced Post 1.4.1.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270379 13f79535-47bb-0310-9956-ffa450edef68
master
Magesh Umasankar 23 years ago
parent
commit
4c06c2bf86
1 changed files with 4 additions and 8 deletions
  1. +4
    -8
      src/main/org/apache/tools/ant/taskdefs/Checksum.java

+ 4
- 8
src/main/org/apache/tools/ant/taskdefs/Checksum.java View File

@@ -72,12 +72,13 @@ import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.condition.Condition;
import org.apache.tools.ant.taskdefs.MatchingTask;
import org.apache.tools.ant.types.FileSet;
import org.apache.tools.ant.types.SrcFile;

/**
* This task can be used to create checksums for files.
* It can also be used to verify checksums.
*
* @author <a href="mailto:umagesh@rediffmail.com">Magesh Umasankar</a>
* @author <a href="mailto:umagesh@apache.org">Magesh Umasankar</a>
*/
public class Checksum extends MatchingTask implements Condition {
/**
@@ -129,8 +130,8 @@ public class Checksum extends MatchingTask implements Condition {
/**
* Sets the file for which the checksum is to be calculated.
*/
public void setFile(File file) {
this.file = file;
public void setFile(SrcFile file) {
this.file = file.getFile();
}

/**
@@ -219,11 +220,6 @@ public class Checksum extends MatchingTask implements Condition {
"Specify at least one source - a file or a fileset.");
}

if (file != null && file.exists() && file.isDirectory()) {
throw new BuildException(
"Checksum cannot be generated for directories");
}

if (property != null && fileext != null) {
throw new BuildException(
"Property and FileExt cannot co-exist.");


Loading…
Cancel
Save