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/core ApplicationDispatcher.java
Date Wed, 31 Oct 2001 17:39:34 GMT
remm        01/10/31 09:39:34

  Modified:    catalina/src/share/org/apache/catalina/core
                        ApplicationDispatcher.java
  Log:
  - Fix for 4501. I don't see any problems which would be caused by using instanceof.
    Please correct me if I'm wrong.
    Patch submitted by Yan Pujante (yan.pujante at reuters.com).
  
  Revision  Changes    Path
  1.27      +14 -14    jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java
  
  Index: ApplicationDispatcher.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- ApplicationDispatcher.java	2001/09/28 16:57:51	1.26
  +++ ApplicationDispatcher.java	2001/10/31 17:39:34	1.27
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java,v
1.26 2001/09/28 16:57:51 remm Exp $
  - * $Revision: 1.26 $
  - * $Date: 2001/09/28 16:57:51 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java,v
1.27 2001/10/31 17:39:34 remm Exp $
  + * $Revision: 1.27 $
  + * $Date: 2001/10/31 17:39:34 $
    *
    * ====================================================================
    *
  @@ -109,7 +109,7 @@
    * <code>javax.servlet.ServletResponseWrapper</code>.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.26 $ $Date: 2001/09/28 16:57:51 $
  + * @version $Revision: 1.27 $ $Date: 2001/10/31 17:39:34 $
    */
   
   final class ApplicationDispatcher
  @@ -341,15 +341,15 @@
       public void forward(ServletRequest request, ServletResponse response)
           throws ServletException, IOException
       {
  -        if( System.getSecurityManager() != null ) {
  +        if (System.getSecurityManager() != null) {
               try {
                   PrivilegedForward dp = new PrivilegedForward(request,response);
                   AccessController.doPrivileged(dp);
  -            } catch( PrivilegedActionException pe) {
  +            } catch (PrivilegedActionException pe) {
                   Exception e = pe.getException();
  -                if( e.getClass().getName().equals("javax.servlet.ServletException") )
  -                    throw (ServletException)e;
  -                throw (IOException)e;
  +                if (e instanceof ServletException)
  +                    throw (ServletException) e;
  +                throw (IOException) e;
               }
           } else {
               doForward(request,response);
  @@ -478,16 +478,16 @@
       public void include(ServletRequest request, ServletResponse response)
           throws ServletException, IOException
       {
  -        if( System.getSecurityManager() != null ) {
  +        if (System.getSecurityManager() != null) {
               try {
                   PrivilegedInclude dp = new PrivilegedInclude(request,response);
                   AccessController.doPrivileged(dp);
  -            } catch( PrivilegedActionException pe) {
  +            } catch (PrivilegedActionException pe) {
                   Exception e = pe.getException();
                   pe.printStackTrace();
  -                if( e.getClass().getName().equals("javax.servlet.ServletException") )
  -                    throw (ServletException)e;
  -                throw (IOException)e;
  +                if (e instanceof ServletException)
  +                    throw (ServletException) e;
  +                throw (IOException) e;
               }
           } else {
               doInclude(request,response);
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message