Author: markt
Date: Thu Apr 10 10:29:23 2008
New Revision: 646889

URL: http://svn.apache.org/viewvc?rev=646889&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=44408
Avoid bottleneck by calling the synchronized method only once.
Patch provided by Robert Andersson.

Modified:
    tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java

Modified: tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java?rev=646889&r1=646888&r2=646889&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java (original)
+++ tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java Thu Apr 10 
10:29:23 2008
@@ -70,6 +70,8 @@
  */
 public class PageContextImpl extends PageContext {
 
+       private static final JspFactory jspf = JspFactory.getDefaultFactory(); 
+
        private BodyContentImpl[] outs;
 
        private int depth;
@@ -895,7 +897,7 @@
                        final ProtectedFunctionMapper functionMap, final 
boolean escape)
                        throws ELException {
                Object retValue;
-        final ExpressionFactory exprFactory = 
JspFactory.getDefaultFactory().getJspApplicationContext(pageContext.getServletContext()).getExpressionFactory();
+        final ExpressionFactory exprFactory = 
jspf.getJspApplicationContext(pageContext.getServletContext()).getExpressionFactory();
                if (SecurityUtil.isPackageProtectionEnabled()) {
                        try {
                                retValue = AccessController



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

Reply via email to