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-4.0/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java
Date Sat, 20 Oct 2001 18:23:35 GMT
remm        01/10/20 11:23:35

  Modified:    catalina/src/share/org/apache/catalina/loader Tag:
                        tomcat_40_branch WebappClassLoader.java
  Log:
  - getResource and getResourceAsStream weren't calling the superclass
    (which is needed when there are external repositories).
  - Will attempt to load a class even if it already failed before.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.15.2.6  +16 -7     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.15.2.5
  retrieving revision 1.15.2.6
  diff -u -r1.15.2.5 -r1.15.2.6
  --- WebappClassLoader.java	2001/10/11 20:56:57	1.15.2.5
  +++ WebappClassLoader.java	2001/10/20 18:23:35	1.15.2.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
1.15.2.5 2001/10/11 20:56:57 remm Exp $
  - * $Revision: 1.15.2.5 $
  - * $Date: 2001/10/11 20:56:57 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
1.15.2.6 2001/10/20 18:23:35 remm Exp $
  + * $Revision: 1.15.2.6 $
  + * $Date: 2001/10/20 18:23:35 $
    *
    * ====================================================================
    *
  @@ -124,7 +124,7 @@
    *
    * @author Remy Maucherat
    * @author Craig R. McClanahan
  - * @version $Revision: 1.15.2.5 $ $Date: 2001/10/11 20:56:57 $
  + * @version $Revision: 1.15.2.6 $ $Date: 2001/10/20 18:23:35 $
    */
   public class WebappClassLoader
       extends URLClassLoader
  @@ -918,6 +918,9 @@
               url = entry.source;
           }
   
  +        if (url == null)
  +            url = super.findResource(name);
  +
           if (debug >= 3) {
               if (url != null)
                   log("    --> Returning '" + url.toString() + "'");
  @@ -1114,6 +1117,12 @@
               if (debug >= 2)
                   log("  --> Returning stream from local");
               stream = findLoadedResource(name);
  +            try {
  +                if (stream == null)
  +                    stream = url.openStream();
  +            } catch (IOException e) {
  +                ; // Ignore
  +            }
               if (stream != null)
                   return (stream);
           }
  @@ -1560,9 +1569,6 @@
           if ((name == null) || (path == null))
               return null;
   
  -        if (notFoundResources.containsKey(name))
  -            return null;
  -
           ResourceEntry entry = (ResourceEntry) resourceEntries.get(name);
           if (entry != null)
               return entry;
  @@ -1627,6 +1633,9 @@
               } catch (NamingException e) {
               }
           }
  +
  +        if ((entry == null) && (notFoundResources.containsKey(name)))
  +            return null;
   
           JarEntry jarEntry = null;
   
  
  
  

Mime
View raw message