You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by um...@apache.org on 2002/09/03 16:52:25 UTC

cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Checksum.java

umagesh     2002/09/03 07:52:25

  Modified:    src/main/org/apache/tools/ant/taskdefs Checksum.java
  Log:
  Merge from 1.5 Branch
  
  PR: 11675
  
  Revision  Changes    Path
  1.27      +9 -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.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- Checksum.java	25 Jul 2002 15:21:04 -0000	1.26
  +++ Checksum.java	3 Sep 2002 14:52:25 -0000	1.27
  @@ -180,7 +180,7 @@
       }
   
       /**
  -     * Whether or not to overwrite existing file irrespective of 
  +     * Whether or not to overwrite existing file irrespective of
        * whether it is newer than
        * the source file.  Defaults to false.
        */
  @@ -254,12 +254,12 @@
   
               if (file != null) {
                   if (filesets.size() > 0) {
  -                    throw new BuildException("Multiple files cannot be used " 
  +                    throw new BuildException("Multiple files cannot be used "
                           + "when Property is specified");
                   }
               } else {
                   if (filesets.size() > 1) {
  -                    throw new BuildException("Multiple files cannot be used " 
  +                    throw new BuildException("Multiple files cannot be used "
                           + "when Property is specified");
                   }
               }
  @@ -275,7 +275,7 @@
           }
   
           if (isCondition && forceOverwrite) {
  -            throw new BuildException("ForceOverwrite cannot be used when " 
  +            throw new BuildException("ForceOverwrite cannot be used when "
                   + "conditions are being used.");
           }
   
  @@ -310,7 +310,7 @@
   
           try {
               addToIncludeFileMap(file);
  -            
  +
               int sizeofFileSet = filesets.size();
               for (int i = 0; i < sizeofFileSet; i++) {
                   FileSet fs = (FileSet) filesets.elementAt(i);
  @@ -337,7 +337,7 @@
           if (file != null) {
               if (file.exists()) {
                   if (property == null) {
  -                    File dest 
  +                    File dest
                           = new File(file.getParent(), file.getName() + fileext);
                       if (forceOverwrite || isCondition ||
                           (file.lastModified() > dest.lastModified())) {
  @@ -398,7 +398,8 @@
                   if (destination instanceof java.lang.String) {
                       String prop = (String) destination;
                       if (isCondition) {
  -                        checksumMatches = checksum.equals(property);
  +                        checksumMatches = checksumMatches &&
  +                            checksum.equals(property);
                       } else {
                           getProject().setNewProperty(prop, checksum);
                       }
  @@ -414,7 +415,7 @@
                               fis = null;
                               br.close();
                               isr.close();
  -                            checksumMatches =
  +                            checksumMatches = checksumMatches &&
                                   checksum.equals(suppliedChecksum);
                           } else {
                               checksumMatches = false;
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>