remm        2003/08/26 00:17:44

  Modified:    catalina/src/share/org/apache/catalina/startup
                        TldConfig.java
  Log:
  - Wrap getCanonicalFile in a try/catch (bug 22691). If the classpath or a CL has 
dubious
    entries, they will simply be ignored.
  
  Revision  Changes    Path
  1.18      +9 -5      
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java
  
  Index: TldConfig.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- TldConfig.java    22 Aug 2003 23:18:24 -0000      1.17
  +++ TldConfig.java    26 Aug 2003 07:17:43 -0000      1.18
  @@ -229,9 +229,9 @@
   
           File tldCache=null;
   
  -        if( context instanceof StandardContext ) {
  -            File workDir=(File)
  -                    
((StandardContext)context).getServletContext().getAttribute(Globals.WORK_DIR_ATTR);
  +        if (context instanceof StandardContext) {
  +            File workDir= (File)
  +                
((StandardContext)context).getServletContext().getAttribute(Globals.WORK_DIR_ATTR);
               tldCache=new File( workDir, "tldCache.ser");
           }
   
  @@ -753,7 +753,7 @@
        * @return Map of paths to all JAR files accessible to all parent class
        *         loaders of the web application class loader
        */
  -    private Map getGlobalJarPaths() throws IOException {
  +    private Map getGlobalJarPaths() {
   
           HashMap globalJarPaths = null;
   
  @@ -767,7 +767,11 @@
                       // over file or the custom jndi handler, but a lot less
                       // buggy overall
                       File file = new File(urls[i].getFile());
  -                    file = file.getCanonicalFile();
  +                    try {
  +                        file = file.getCanonicalFile();
  +                    } catch (IOException e) {
  +                        // Ignore
  +                    }
                       if (file.exists()) {
                           String path = file.getAbsolutePath();
                           if (path.endsWith(".jar")) {
  
  
  

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

Reply via email to