antoine     2003/07/25 11:40:54

  Modified:    src/main/org/apache/tools/ant DirectoryScanner.java
                        AntClassLoader.java
  Log:
  checkstyle
  
  Revision  Changes    Path
  1.58      +5 -6      ant/src/main/org/apache/tools/ant/DirectoryScanner.java
  
  Index: DirectoryScanner.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/DirectoryScanner.java,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- DirectoryScanner.java     23 Jul 2003 08:09:01 -0000      1.57
  +++ DirectoryScanner.java     25 Jul 2003 18:40:53 -0000      1.58
  @@ -70,7 +70,6 @@
   import org.apache.tools.ant.types.selectors.SelectorScanner;
   import org.apache.tools.ant.types.selectors.SelectorUtils;
   import org.apache.tools.ant.util.FileUtils;
  -import org.apache.tools.ant.taskdefs.condition.Os;
   
   /**
    * Class for scanning a directory for files/directories which match certain
  @@ -707,7 +706,7 @@
                           if (!path.equals(currentelement)) {
                               myfile = findFile(basedir, currentelement);
                               if (myfile != null) {
  -                                currentelement = 
  +                                currentelement =
                                       fileUtils.removeLeadingPath(basedir,
                                                                   myfile);
                               }
  @@ -716,7 +715,7 @@
                           throw new BuildException(ex);
                       }
                   }
  -            
  +
                   if ((myfile == null || !myfile.exists()) && 
!isCaseSensitive) {
                       File f = findFileCaseInsensitive(basedir, 
currentelement);
                       if (f.exists()) {
  @@ -729,7 +728,7 @@
                   }
   
                   if (myfile != null && myfile.exists()) {
  -                    if (!followSymlinks 
  +                    if (!followSymlinks
                           && isSymlink(basedir, currentelement)) {
                           continue;
                       }
  @@ -902,7 +901,7 @@
           if (!filesIncluded.contains(name)
               && !filesExcluded.contains(name)
               && !filesDeselected.contains(name)) {
  -        
  +
               if (!isExcluded(name)) {
                   if (isSelected(name, file)) {
                       filesIncluded.addElement(name);
  @@ -942,7 +941,7 @@
                           scandir(file, name + File.separator, fast);
                       }
                   }
  -                
  +
               } else {
                   everythingIncluded = false;
                   dirsExcluded.addElement(name);
  
  
  
  1.74      +5 -1      ant/src/main/org/apache/tools/ant/AntClassLoader.java
  
  Index: AntClassLoader.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/AntClassLoader.java,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -r1.73 -r1.74
  --- AntClassLoader.java       24 Jul 2003 13:24:35 -0000      1.73
  +++ AntClassLoader.java       25 Jul 2003 18:40:53 -0000      1.74
  @@ -175,6 +175,10 @@
        * The size of buffers to be used in this classloader.
        */
       private static final int BUFFER_SIZE = 8192;
  +    /**
  +     * Number of array elements in a test array of strings
  +     */
  +    private static final int NUMBER_OF_STRINGS = 256;
   
       /**
        * The components of the classpath that the classloader searches
  @@ -549,7 +553,7 @@
           //At least one constructor is guaranteed to be there, but check 
anyway.
           if (cons != null) {
               if (cons.length > 0 && cons[0] != null) {
  -                final String[] strs = new String[256];
  +                final String[] strs = new String[NUMBER_OF_STRINGS];
                   try {
                       cons[0].newInstance(strs);
                       // Expecting an exception to be thrown by this call:
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to