craigmcc 01/05/23 14:53:02
Modified: catalina/src/share/org/apache/catalina/core
ApplicationDispatcher.java
Log:
Change the way that the servlet's service() method is invoked to match the
way this is done in ApplicationFilterChain when a top-level servlet is
called. This should avoid compiler complaints on
Win2k/Forte2.0/JDK1.3.0_01.
NOTE: Researching this issue points out a small optimization that can
take place in ApplicationFilterChain for SingleThreadModel servlets - see
next patch.
PR: Patch #2 of the "8 Patches" email on 23 May 2001
Submitted by: Peter Costello <[EMAIL PROTECTED]>
Revision Changes Path
1.17 +10 -9
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.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- ApplicationDispatcher.java 2001/05/12 04:56:54 1.16
+++ ApplicationDispatcher.java 2001/05/23 21:53:01 1.17
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java,v
1.16 2001/05/12 04:56:54 craigmcc Exp $
- * $Revision: 1.16 $
- * $Date: 2001/05/12 04:56:54 $
+ * $Header:
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java,v
1.17 2001/05/23 21:53:01 craigmcc Exp $
+ * $Revision: 1.17 $
+ * $Date: 2001/05/23 21:53:01 $
*
* ====================================================================
*
@@ -98,7 +98,7 @@
* <code>javax.servlet.ServletResponseWrapper</code>.
*
* @author Craig R. McClanahan
- * @version $Revision: 1.16 $ $Date: 2001/05/12 04:56:54 $
+ * @version $Revision: 1.17 $ $Date: 2001/05/23 21:53:01 $
*/
final class ApplicationDispatcher
@@ -561,11 +561,12 @@
// Call the service() method for the allocated servlet instance
try {
if (servlet != null) {
- if ((servlet instanceof HttpServlet) &&
- (hrequest != null) && (hresponse != null))
- ((HttpServlet) servlet).service(hrequest, hresponse);
- else
- servlet.service(request, response);
+ if ((hrequest != null) && (hresponse != null)) {
+ servlet.service((HttpServletRequest) request,
+ (HttpServletResponse) response);
+ } else {
+ servlet.service(request, response);
+ }
}
} catch (IOException e) {
log(sm.getString("applicationDispatcher.serviceException",