You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by st...@apache.org on 2002/02/01 08:24:40 UTC

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

stevel      02/01/31 23:24:40

  Modified:    src/main/org/apache/tools/ant/taskdefs/condition
                        FilesMatch.java
  Log:
  test returns false (not an exception) if either file is missing, this provides better update semantics
  
  Revision  Changes    Path
  1.3       +3 -9      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/condition/FilesMatch.java
  
  Index: FilesMatch.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/condition/FilesMatch.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FilesMatch.java	29 Jan 2002 17:12:20 -0000	1.2
  +++ FilesMatch.java	1 Feb 2002 07:24:40 -0000	1.3
  @@ -63,7 +63,7 @@
    * are not looked at at all.
    *
    * @author Steve Loughran
  - * @version $Revision: 1.2 $
  + * @version $Revision: 1.3 $
    * @created 12 January 2002
    * @since Ant 1.5
    */
  @@ -81,7 +81,7 @@
       private FileUtils fu = FileUtils.newFileUtils();
   
       /**
  -     * Sets the File1 attribute 
  +     * Sets the File1 attribute
        *
        * @param file1 The new File1 value
        */
  @@ -112,13 +112,7 @@
           if (file1 == null || file2 == null) {
               throw new BuildException("both file1 and file2 are required in fileequals");
           }
  -        if (!file1.exists()) {
  -            throw new BuildException("file " + file1 + " not found");
  -        }
  -        if (!file2.exists()) {
  -            throw new BuildException("file " + file2 + " not found");
  -        }
  -        
  +
           //#now match the files
           boolean matches=false;
           try {
  
  
  

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