ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/file Delete.java
Date Sun, 27 Jan 2002 00:25:29 GMT
donaldp     02/01/26 16:25:29

  Modified:    proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/file
                        Delete.java
  Log:
  Made loop counter a simple variable rather than a complex value
  
  Fixing a audit violation
  
  Revision  Changes    Path
  1.12      +9 -7      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/file/Delete.java
  
  Index: Delete.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/file/Delete.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Delete.java	26 Jan 2002 02:08:10 -0000	1.11
  +++ Delete.java	27 Jan 2002 00:25:29 -0000	1.12
  @@ -10,8 +10,8 @@
   import java.io.File;
   import java.util.ArrayList;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.tools.ant.types.DirectoryScanner;
   import org.apache.tools.ant.Task;
  +import org.apache.tools.ant.types.DirectoryScanner;
   import org.apache.tools.ant.types.FileSet;
   import org.apache.tools.ant.types.ScannerUtil;
   
  @@ -122,15 +122,17 @@
           }
   
           // delete the files in the filesets
  -        for( int i = 0; i < filesets.size(); i++ )
  +        final int size = filesets.size();
  +        for( int i = 0; i < size; i++ )
           {
  -            FileSet fs = (FileSet)filesets.get( i );
  +            final FileSet fileSet = (FileSet)filesets.get( i );
               try
               {
  -                DirectoryScanner ds = ScannerUtil.getDirectoryScanner( fs );
  -                String[] files = ds.getIncludedFiles();
  -                String[] dirs = ds.getIncludedDirectories();
  -                removeFiles( fs.getDir(), files, dirs );
  +                final DirectoryScanner scanner =
  +                    ScannerUtil.getDirectoryScanner( fileSet );
  +                String[] files = scanner.getIncludedFiles();
  +                String[] dirs = scanner.getIncludedDirectories();
  +                removeFiles( fileSet.getDir(), files, dirs );
               }
               catch( TaskException be )
               {
  
  
  

--
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