tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@locus.apache.org
Subject cvs commit: jakarta-tools/ant/src/main/org/apache/tools/ant/taskdefs Javadoc2.java
Date Mon, 13 Dec 1999 11:33:58 GMT
rubys       99/12/13 03:33:58

  Modified:    ant/src/main/org/apache/tools/ant/taskdefs Javadoc2.java
  Log:
  remove JDK 1.2 specifics (part 1)
  
  Revision  Changes    Path
  1.6       +8 -12     jakarta-tools/ant/src/main/org/apache/tools/ant/taskdefs/Javadoc2.java
  
  Index: Javadoc2.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tools/ant/src/main/org/apache/tools/ant/taskdefs/Javadoc2.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Javadoc2.java	1999/12/12 17:41:01	1.5
  +++ Javadoc2.java	1999/12/13 11:33:58	1.6
  @@ -420,12 +420,6 @@
           return string.startsWith(pattern.substring(0, pattern.length() - 2));
       }
       
  -    class JavaFilter implements FileFilter {
  -        public boolean accept(File file) {
  -            return (file.getName().endsWith(".java") || file.isDirectory());
  -        }
  -    }
  -        
       /**
        * Returns an hashtable of packages linked to the last parsed
        * file in that package. This map is use to return a list of unique
  @@ -435,7 +429,7 @@
           Hashtable map = new Hashtable();
           
           Vector files = new Vector();
  -        getFiles(path, files, new JavaFilter());
  +        getFiles(path, files);
           
           Enumeration e = files.elements();
           while (e.hasMoreElements()) {
  @@ -451,19 +445,21 @@
        * Fills the given vector with files under the given path filtered
        * by the given file filter.
        */
  -    private void getFiles(File path, Vector list, FileFilter filter) {
  +    private void getFiles(File path, Vector list) {
           if (!path.exists()) {
               throw new BuildException("Path " + path + " does not exist.");
           }
           
  -        File[] files = path.listFiles(filter);
  +        String[] files = path.list();
  +        String cwd = path.getName() + System.getProperty("path.separator");
           
           if (files != null) {
               int count = 0;
               for (int i = 0; i < files.length; i++) {
  -                if (files[i].isDirectory()) { 
  -                    getFiles(files[i], list, filter);
  -                } else {
  +		File file = new File(cwd + files[i]);
  +                if (file.isDirectory()) { 
  +                    getFiles(file, list);
  +                } else if (files[i].endsWith(".java")) {
                       count++;
                       list.addElement(files[i]);
                   }
  
  
  

Mime
View raw message