remm        02/02/17 00:23:19

  Modified:    catalina/src/share/org/apache/catalina/startup
                        ClassLoaderFactory.java
  Log:
  - Remove the triggers from the Classloader factory, as it is now dead code.
  
  Revision  Changes    Path
  1.7       +4 -122    
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ClassLoaderFactory.java
  
  Index: ClassLoaderFactory.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ClassLoaderFactory.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ClassLoaderFactory.java   13 Feb 2002 20:28:38 -0000      1.6
  +++ ClassLoaderFactory.java   17 Feb 2002 08:23:19 -0000      1.7
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ClassLoaderFactory.java,v
 1.6 2002/02/13 20:28:38 remm Exp $
  - * $Revision: 1.6 $
  - * $Date: 2002/02/13 20:28:38 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ClassLoaderFactory.java,v
 1.7 2002/02/17 08:23:19 remm Exp $
  + * $Revision: 1.7 $
  + * $Date: 2002/02/17 08:23:19 $
    *
    * ====================================================================
    *
  @@ -92,7 +92,7 @@
    * </ul>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.6 $ $Date: 2002/02/13 20:28:38 $
  + * @version $Revision: 1.7 $ $Date: 2002/02/17 08:23:19 $
    */
   
   public final class ClassLoaderFactory {
  @@ -107,29 +107,6 @@
       private static int debug = 0;
   
   
  -    /**
  -     * The set of trigger classes that will cause a proposed repository not
  -     * to be added if this class is visible to the class loader that loaded
  -     * this factory class.  Typically, trigger classes will be listed for
  -     * components that have been integrated into the JDK for later versions,
  -     * but where the corresponding JAR files are required to run on
  -     * earlier versions.
  -     */
  -    private static String[] triggers = {
  -        "com.sun.jndi.ldap.LdapCtxFactory",      // LDAP      added in 1.3
  -        "com.sun.net.ssl.internal.ssl.Provider", // JSSE      added in 1.4
  -        "javax.security.auth.Subject",           // JAAS      added in 1.4
  -        "javax.naming.Context",                  // JNDI      added in 1.3
  -        "javax.net.SocketFactory",               // JSSE      added in 1.4
  -        "javax.security.cert.X509Certificate",   // JSSE      added in 1.4
  -        "javax.sql.DataSource",                  // JDBC ext. added in 1.4
  -        // "javax.xml.parsers.DocumentBuilder",     // JAXP      added in 1.4
  -        "org.apache.catalina.startup.Bootstrap", // Don't load ourselves
  -        // "org.apache.crimson.jaxp.DocumentBuilderImpl",
  -                                                 // Crimson   added in 1.4
  -    };
  -
  -
       // ------------------------------------------------------ Static Properties
   
   
  @@ -155,28 +132,6 @@
       }
   
   
  -    /**
  -     * Return the trigger class names that we check for.
  -     */
  -    public static String[] getTriggers() {
  -
  -        return (triggers);
  -
  -    }
  -
  -
  -    /**
  -     * Set the trigger class names that we check for.
  -     *
  -     * @param newTriggers The new trigger class names
  -     */
  -    public static void setTriggers(String newTriggers[]) {
  -
  -        triggers = newTriggers;
  -
  -    }
  -
  -
       // --------------------------------------------------------- Public Methods
   
   
  @@ -253,79 +208,6 @@
               classLoader = new StandardClassLoader(array, parent);
           classLoader.setDelegate(true);
           return (classLoader);
  -
  -    }
  -
  -
  -    /**
  -     * Check the specified directory, and return <code>true</code> if it does
  -     * not contain any of the trigger classes.
  -     *
  -     * @param directory The directory to be checked
  -     *
  -     * @exception IOException if an input/output error occurs
  -     */
  -    public static boolean validateDirectory(File directory)
  -        throws IOException {
  -
  -        if (triggers == null)
  -            return (true);
  -        for (int i = 0; i < triggers.length; i++) {
  -            Class clazz = null;
  -            try {
  -                clazz = Class.forName(triggers[i]);
  -            } catch (Throwable t) {
  -                clazz = null;
  -            }
  -            if (clazz == null)
  -                continue;
  -            File file = new File(directory,
  -                                 triggers[i].replace('.', File.separatorChar) +
  -                                 ".class");
  -            if (debug >= 2)
  -                log(" Checking for " + file.getAbsolutePath());
  -            if (file.exists() && file.canRead())
  -                return (false);
  -        }
  -        return (true);
  -
  -    }
  -
  -
  -    /**
  -     * Check the specified JAR file, and return <code>true</code> if it does
  -     * not contain any of the trigger classes.
  -     *
  -     * @param jarfile The JAR file to be checked
  -     *
  -     * @exception IOException if an input/output error occurs
  -     */
  -    public static boolean validateJarFile(File jarfile)
  -        throws IOException {
  -
  -        if (triggers == null)
  -            return (true);
  -        JarFile jarFile = new JarFile(jarfile);
  -        for (int i = 0; i < triggers.length; i++) {
  -            Class clazz = null;
  -            try {
  -                clazz = Class.forName(triggers[i]);
  -            } catch (Throwable t) {
  -                clazz = null;
  -            }
  -            if (clazz == null)
  -                continue;
  -            String name = triggers[i].replace('.', '/') + ".class";
  -            if (debug >= 2)
  -                log(" Checking for " + name);
  -            JarEntry jarEntry = jarFile.getJarEntry(name);
  -            if (jarEntry != null) {
  -                jarFile.close();
  -                return (false);
  -            }
  -        }
  -        jarFile.close();
  -        return (true);
   
       }
   
  
  
  

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

Reply via email to