ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From umag...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Checksum.java
Date Tue, 25 Dec 2001 20:07:15 GMT
umagesh     01/12/25 12:07:15

  Modified:    src/main/org/apache/tools/ant/taskdefs Checksum.java
  Log:
  setFile(File) has been replaced with setFile(SrcFile).  No backwards
  compatibilty issues here as task was introduced Post 1.4.1.
  
  Revision  Changes    Path
  1.6       +4 -8      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Checksum.java
  
  Index: Checksum.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Checksum.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Checksum.java	2001/11/30 17:35:06	1.5
  +++ Checksum.java	2001/12/25 20:07:14	1.6
  @@ -72,12 +72,13 @@
   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 @@
       /**
        * 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();
       }
   
       /**
  @@ -217,11 +218,6 @@
           if (file == null && filesets.size() == 0) {
               throw new BuildException(
                   "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) {
  
  
  

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


Mime
View raw message