billbarker    02/01/10 22:55:30

  Modified:    src/share/org/apache/tomcat/util/compat Jdk12Support.java
  Log:
  Remove hard-coded assumptions about URLClassLoader.
  
  To allow configuring the App-Classloader to be a SimpleClassLoader (to hopefully get 
around the problem of re-loading jar files), we need more flexablity here.  The only 
effect in the default configuration is to execute a few more instructions on 
non-critical paths.
  
  Revision  Changes    Path
  1.10      +9 -2      
jakarta-tomcat/src/share/org/apache/tomcat/util/compat/Jdk12Support.java
  
  Index: Jdk12Support.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/compat/Jdk12Support.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Jdk12Support.java 19 Sep 2001 01:28:34 -0000      1.9
  +++ Jdk12Support.java 11 Jan 2002 06:55:30 -0000      1.10
  @@ -138,9 +138,16 @@
               while(cl instanceof DependClassLoader && cl != null )
                   cl=((DependClassLoader)cl).getParentLoader();
               if (cl==null) break;
  -            if (depth==c) return ((URLClassLoader)cl).getURLs();
  +            if (depth==c) {
  +             if(cl instanceof URLClassLoader)
  +                 return ((URLClassLoader)cl).getURLs();
  +             else if(cl instanceof SimpleClassLoader)
  +                 return ((SimpleClassLoader)cl).getURLs();
  +             else
  +                 return null;
  +         }
               c++;
  -            cl=((URLClassLoader)cl).getParent();
  +            cl=getParentLoader(cl);
           }while((cl!=null) && ( depth >= c ));
           return null;
       }
  
  
  

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

Reply via email to