tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper JspC.java
Date Mon, 08 Mar 2004 23:59:12 GMT
remm        2004/03/08 15:59:12

  Modified:    jasper2/src/share/org/apache/jasper JspC.java
  Log:
  - Fix bug 27520: Avoid NPE when folder is not readable.
  
  Revision  Changes    Path
  1.66      +6 -13     jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java
  
  Index: JspC.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java,v
  retrieving revision 1.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- JspC.java	18 Feb 2004 21:22:21 -0000	1.65
  +++ JspC.java	8 Mar 2004 23:59:11 -0000	1.66
  @@ -796,28 +796,21 @@
           }
           while (!dirs.isEmpty()) {
               String s = dirs.pop().toString();
  -            //System.out.println("--" + s);
               File f = new File(s);
               if (f.exists() && f.isDirectory()) {
                   String[] files = f.list();
                   String ext;
  -                for (int i = 0; i < files.length; i++) {
  +                for (int i = 0; (files != null) && i < files.length; i++) {
                       File f2 = new File(s, files[i]);
  -                    //System.out.println(":" + f2.getPath());
                       if (f2.isDirectory()) {
                           dirs.push(f2.getPath());
  -                        //System.out.println("++" + f2.getPath());
                       } else {
                           String path = f2.getPath();
                           String uri = path.substring(uriRoot.length());
  -                        ext = files[i].substring(files[i].lastIndexOf('.')
  -						 + 1);
  +                        ext = files[i].substring(files[i].lastIndexOf('.') +1);
                           if (extensions.contains(ext) ||
  -                                jspConfig.isJspPage(uri)) {
  -                            //System.out.println(s + "?" + files[i]);
  +                            jspConfig.isJspPage(uri)) {
                               pages.addElement(path);
  -                        } else {
  -			    //System.out.println("not done:" + ext);
                           }
                       }
                   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message