jmcnally 02/05/10 15:39:11 Modified: src/java/org/apache/turbine Turbine.java Log: slight performance improvement, avoids a method call. Revision Changes Path 1.39 +16 -16 jakarta-turbine-3/src/java/org/apache/turbine/Turbine.java Index: Turbine.java =================================================================== RCS file: /home/cvs/jakarta-turbine-3/src/java/org/apache/turbine/Turbine.java,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- Turbine.java 30 Apr 2002 16:39:24 -0000 1.38 +++ Turbine.java 10 May 2002 22:39:11 -0000 1.39 @@ -122,7 +122,7 @@ * @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a> * @author <a href="mailto:[EMAIL PROTECTED]">Daniel Rall</a> * @author <a href="mailto:[EMAIL PROTECTED]">Martin Poeschl</a> - * @version $Id: Turbine.java,v 1.38 2002/04/30 16:39:24 jvanzyl Exp $ + * @version $Id: Turbine.java,v 1.39 2002/05/10 22:39:11 jmcnally Exp $ */ public class Turbine extends HttpServlet @@ -207,22 +207,19 @@ */ public final void init(RunData data) { - if (firstDoGet) + synchronized (Turbine.class) { - synchronized (Turbine.class) + if (firstDoGet) { - if (firstDoGet) - { - // All we want to do here is save some servlet - // information so that services and processes - // that don't have direct access to a RunData - // object can still know something about - // the servlet environment. - saveServletInfo(data); - - // Mark that we're done. - firstDoGet = false; - } + // All we want to do here is save some servlet + // information so that services and processes + // that don't have direct access to a RunData + // object can still know something about + // the servlet environment. + saveServletInfo(data); + + // Mark that we're done. + firstDoGet = false; } } } @@ -285,7 +282,10 @@ // If this is the first invocation, perform some // initialization. Certain services need RunData to initialize // themselves. - init(data); + if (firstDoGet) + { + init(data); + } // Stages of Pipeline implementation execution // configurable via attached Valve implementations in a
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>