tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: org.apache.catalina.core.StandardWrapper.java : allocate() : Redundant check on singleThreadModel variable
Date Sun, 25 Jul 2004 23:11:10 GMT

----- Original Message ----- 
From: <apaliwal@hss.hns.com>
To: <tomcat-dev@jakarta.apache.org>
Sent: Sunday, July 25, 2004 5:41 AM
Subject: org.apache.catalina.core.StandardWrapper.java : allocate() :
Redundant check on singleThreadModel variable


>
>
>
>
> File Name   : org.apache.catalina.core.StandardWrapper.java
> CVS Revision      :  1.44
> Function Name     : public Servlet allocate() throws ServletException
> Line No's   : 677 - 705
>
> Explanation:
>
> The allocate() function checks on singleThreadModel varibale within the
> scope of if(!singleThreadModel), which is not needed.
> The snippet is attached herewith. The nested "if(!singleThreadModel)"  is
> redundant as it lies in the scope if external if
> and shall get executed only when the Servlet is not STM.
>

Except that loadServlet() may change the value of 'singleThreadModel', hence
the need for the second check.

>


Mime
View raw message