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.

Starts at Line No - 677

if (!singleThreadModel) {

            // Load and initialize our instance if necessary
            if (instance == null) {
                synchronized (this) {
                    if (instance == null) {
                        try {
                            if (log.isDebugEnabled())
                                log.debug("Allocating non-STM instance");

                            instance = loadServlet();
                        } catch (ServletException e) {
                            throw e;
                        } catch (Throwable e) {
                            throw new ServletException
                                (sm.getString("standardWrapper.allocate"),
e);
                        }
                    }
                }
            }

         // This check is redundant as the condition is already checked
above
         if (!singleThreadModel) {
                if (log.isTraceEnabled())
                    log.trace("  Returning non-STM instance");
                countAllocated++;
                return (instance);
            }

        }



***********************  HSS-Unclassified   ***********************
"DISCLAIMER: This message is proprietary to Hughes Software Systems Limited
(HSS) and is intended solely for the use of the individual to whom it is
addressed. It may contain  privileged or confidential information and
should not be circulated or used for any purpose other than for what it is
intended. If you have received this message in error, please notify the
originator immediately. If you are not the intended recipient, you are
notified that you are strictly prohibited from using, copying, altering, or
disclosing the contents of this message. HSS accepts no responsibility for
loss or damage arising from the use of the information transmitted by this
email including damage from virus."


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to