tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@locus.apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader FileClassLoader.java Reloader.java StandardLoader.java
Date Thu, 21 Sep 2000 20:06:10 GMT
craigmcc    00/09/21 13:06:08

  Modified:    catalina/src/share/org/apache/catalina Loader.java
               catalina/src/share/org/apache/catalina/loader
                        FileClassLoader.java Reloader.java
                        StandardLoader.java
  Log:
  Remove the ability to remove an existing repository from the Loader APIs.
  This is not something that well behaved class loaders should really
  support (and it is not supported by URLClassLoader).
  
  Revision  Changes    Path
  1.2       +4 -12     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Loader.java
  
  Index: Loader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Loader.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Loader.java	2000/08/11 05:24:08	1.1
  +++ Loader.java	2000/09/21 20:05:58	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Loader.java,v
1.1 2000/08/11 05:24:08 craigmcc Exp $
  - * $Revision: 1.1 $
  - * $Date: 2000/08/11 05:24:08 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Loader.java,v
1.2 2000/09/21 20:05:58 craigmcc Exp $
  + * $Revision: 1.2 $
  + * $Date: 2000/09/21 20:05:58 $
    *
    * ====================================================================
    *
  @@ -96,7 +96,7 @@
    * </ul>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2000/08/11 05:24:08 $
  + * @version $Revision: 1.2 $ $Date: 2000/09/21 20:05:58 $
    */
   
   public interface Loader {
  @@ -186,14 +186,6 @@
        * @param listener The listener to remove
        */
       public void removePropertyChangeListener(PropertyChangeListener listener);
  -
  -
  -    /**
  -     * Remove a repository from the set of repositories for this loader.
  -     *
  -     * @param repository Repository to be removed
  -     */
  -    public void removeRepository(String repository);
   
   
   }
  
  
  
  1.2       +4 -78     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/FileClassLoader.java
  
  Index: FileClassLoader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/FileClassLoader.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FileClassLoader.java	2000/08/11 22:42:03	1.1
  +++ FileClassLoader.java	2000/09/21 20:06:00	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/FileClassLoader.java,v
1.1 2000/08/11 22:42:03 craigmcc Exp $
  - * $Revision: 1.1 $
  - * $Date: 2000/08/11 22:42:03 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/FileClassLoader.java,v
1.2 2000/09/21 20:06:00 craigmcc Exp $
  + * $Revision: 1.2 $
  + * $Date: 2000/09/21 20:06:00 $
    *
    * ====================================================================
    *
  @@ -101,7 +101,7 @@
    * and <code>minSize</code> properties.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2000/08/11 22:42:03 $
  + * @version $Revision: 1.2 $ $Date: 2000/09/21 20:06:00 $
    */
   
   public final class FileClassLoader
  @@ -628,80 +628,6 @@
   		    results[k++] = allowed[i];
   	    }
   	    allowed = results;
  -	}
  -
  -    }
  -
  -
  -    /**
  -     * Remove the specified repository from the set of places this ClassLoader
  -     * can look for classes to be loaded.  Any classes already loaded from this
  -     * repository will remain, but no future loads from here will take place.
  -     *
  -     * @param repository Name of the repository to remove
  -     */
  -    public synchronized void removeRepository(String repository) {
  -
  -	if (debug >= 1)
  -	    log("removeRepository(" + repository + ")");
  -
  -	File file = new File(repository);
  -
  -	synchronized (directories) {
  -	    int j = -1;
  -	    for (int i = 0; i < directories.length; i++) {
  -		if (file.equals(directories[i])) {
  -		    j = i;
  -		    break;
  -		}
  -	    }
  -	    if (j < 0)
  -		return;
  -	    int k = 0;
  -	    File results[] = new File[directories.length - 1];
  -	    for (int i = 0; i < directories.length; i++) {
  -		if (i != j)
  -		    results[k++] = directories[i];
  -	    }
  -	    directories = results;
  -	}
  -
  -	synchronized (jarFiles) {
  -	    int j = -1;
  -	    for (int i = 0; i < jarFiles.length; i++) {
  -		if (file.equals(jarFiles[i])) {
  -		    j = i;
  -		    break;
  -		}
  -	    }
  -	    if (j < 0)
  -		return;
  -	    int k = 0;
  -	    File results[] = new File[jarFiles.length - 1];
  -	    for (int i = 0; i < jarFiles.length; i++) {
  -		if (i != j)
  -		    results[k++] = jarFiles[i];
  -	    }
  -	    jarFiles = results;
  -	}
  -
  -	synchronized (repositories) {
  -	    int j = -1;
  -	    for (int i = 0; i < repositories.length; i++) {
  -		if (repository.equals(repositories[i])) {
  -		    j = i;
  -		    break;
  -		}
  -	    }
  -	    if (j < 0)
  -		return;
  -	    int k = 0;
  -	    String results[] = new String[repositories.length - 1];
  -	    for (int i = 0; i < repositories.length; i++) {
  -		if (i != j)
  -		    results[k++] = repositories[i];
  -	    }
  -	    repositories = results;
   	}
   
       }
  
  
  
  1.2       +4 -38     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/Reloader.java
  
  Index: Reloader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/Reloader.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Reloader.java	2000/08/11 22:42:04	1.1
  +++ Reloader.java	2000/09/21 20:06:04	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/Reloader.java,v
1.1 2000/08/11 22:42:04 craigmcc Exp $
  - * $Revision: 1.1 $
  - * $Date: 2000/08/11 22:42:04 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/Reloader.java,v
1.2 2000/09/21 20:06:04 craigmcc Exp $
  + * $Revision: 1.2 $
  + * $Date: 2000/09/21 20:06:04 $
    *
    * ====================================================================
    *
  @@ -71,7 +71,7 @@
    * <code>StandardLoader</code>.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2000/08/11 22:42:04 $
  + * @version $Revision: 1.2 $ $Date: 2000/09/21 20:06:04 $
    */
   
   public interface Reloader {
  @@ -160,40 +160,6 @@
        * is appropriate?
        */
       public boolean modified();
  -
  -
  -    /**
  -     * Remove a fully qualified class or resource name from the allowed list.
  -     *
  -     * @param name The name to remove
  -     */
  -    public void removeAllowed(String name);
  -
  -
  -    /**
  -     * Remove the specified repository from the set of places this ClassLoader
  -     * can look for classes to be loaded.  Any classes already loaded from this
  -     * repository will remain, but no future loads from here will take place.
  -     *
  -     * @param repository Name of the repository to remove
  -     */
  -    public void removeRepository(String repository);
  -
  -
  -    /**
  -     * Remove a class or resource name prefix from the restricted list.
  -     *
  -     * @param prefix Prefix to be removed
  -     */
  -    public void removeRestricted(String prefix);
  -
  -
  -    /**
  -     * Remove a class or resource name prefix from the system list.
  -     *
  -     * @param prefix Prefix to be removed
  -     */
  -    public void removeSystem(String prefix);
   
   
   }
  
  
  
  1.4       +4 -37     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardLoader.java
  
  Index: StandardLoader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardLoader.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StandardLoader.java	2000/09/14 00:14:57	1.3
  +++ StandardLoader.java	2000/09/21 20:06:05	1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardLoader.java,v
1.3 2000/09/14 00:14:57 craigmcc Exp $
  - * $Revision: 1.3 $
  - * $Date: 2000/09/14 00:14:57 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardLoader.java,v
1.4 2000/09/21 20:06:05 craigmcc Exp $
  + * $Revision: 1.4 $
  + * $Date: 2000/09/21 20:06:05 $
    *
    * ====================================================================
    *
  @@ -97,7 +97,7 @@
    * is not present, the system class loader will be used instead.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.3 $ $Date: 2000/09/14 00:14:57 $
  + * @version $Revision: 1.4 $ $Date: 2000/09/21 20:06:05 $
    */
   
   public final class StandardLoader
  @@ -473,39 +473,6 @@
       public void removePropertyChangeListener(PropertyChangeListener listener) {
   
   	support.removePropertyChangeListener(listener);
  -
  -    }
  -
  -
  -    /**
  -     * Remove a repository from the set of repositories for this loader.
  -     *
  -     * @param repository Repository to be removed
  -     */
  -    public void removeRepository(String repository) {
  -
  -        if (debug >= 1)
  -	    log(sm.getString("standardLoader.removeRepository", repository));
  -	int j = -1;
  -	for (int i = 0; i < repositories.length; i++) {
  -	    if (repositories[i].equals(repository)) {
  -		j = i;
  -		break;
  -	    }
  -	}
  -	if (j < 0)
  -	    return;
  -	String results[] = new String[repositories.length - 1];
  -	j = 0;
  -	for (int i = 0; i < repositories.length; i++) {
  -	    if (!repositories[i].equals(repository))
  -		results[j++] = repositories[i];
  -	}
  -	repositories = results;
  -	if (started) {
  -	    classLoader.removeRepository(repository);
  -	    setClassPath();
  -	}
   
       }
   
  
  
  

Mime
View raw message