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-catalina/catalina/src/share/org/apache/catalina/util CustomObjectInputStream.java
Date Fri, 08 Aug 2003 16:56:40 GMT
remm        2003/08/08 09:56:40

  Modified:    catalina/src/share/org/apache/catalina/util
                        CustomObjectInputStream.java
  Log:
  - Using Class.forName, which somehow fixes the test case for bug 22146.
  
  Revision  Changes    Path
  1.2       +17 -14    jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/util/CustomObjectInputStream.java
  
  Index: CustomObjectInputStream.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/util/CustomObjectInputStream.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CustomObjectInputStream.java	18 Jul 2002 16:47:45 -0000	1.1
  +++ CustomObjectInputStream.java	8 Aug 2003 16:56:40 -0000	1.2
  @@ -74,9 +74,9 @@
    * class loader for this web application.  This allows classes defined only
    * with the web application to be found correctly.
    *
  - * @@author Craig R. McClanahan
  - * @@author Bip Thelin
  - * @@version $Revision$, $Date$
  + * @author Craig R. McClanahan
  + * @author Bip Thelin
  + * @version $Revision$, $Date$
    */
   
   public final class CustomObjectInputStream
  @@ -88,13 +88,14 @@
        */
       private ClassLoader classLoader = null;
   
  +
       /**
        * Construct a new instance of CustomObjectInputStream
        *
  -     * @@param stream The input stream we will read from
  -     * @@param classLoader The class loader used to instantiate objects
  +     * @param stream The input stream we will read from
  +     * @param classLoader The class loader used to instantiate objects
        *
  -     * @@exception IOException if an input/output error occurs
  +     * @exception IOException if an input/output error occurs
        */
       public CustomObjectInputStream(InputStream stream,
                                      ClassLoader classLoader)
  @@ -104,18 +105,20 @@
           this.classLoader = classLoader;
       }
   
  +
       /**
        * Load the local class equivalent of the specified stream class
        * description, by using the class loader assigned to this Context.
        *
  -     * @@param classDesc Class description from the input stream
  +     * @param classDesc Class description from the input stream
        *
  -     * @@exception ClassNotFoundException if this class cannot be found
  -     * @@exception IOException if an input/output error occurs
  +     * @exception ClassNotFoundException if this class cannot be found
  +     * @exception IOException if an input/output error occurs
        */
       public Class resolveClass(ObjectStreamClass classDesc)
           throws ClassNotFoundException, IOException {
  -
  -        return (classLoader.loadClass(classDesc.getName()));
  +        return Class.forName(classDesc.getName(), false, classLoader);
       }
  +
  +
   }
  
  
  

Mime
View raw message