Author: markt
Date: Mon May 26 13:42:41 2014
New Revision: 1597583

URL: http://svn.apache.org/r1597583
Log:
Fix a TODO
Only set the JspFactory if not already set

Modified:
    tomcat/trunk/java/org/apache/jasper/servlet/JasperInitializer.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/jasper/servlet/JasperInitializer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/servlet/JasperInitializer.java?rev=1597583&r1=1597582&r2=1597583&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/servlet/JasperInitializer.java 
(original)
+++ tomcat/trunk/java/org/apache/jasper/servlet/JasperInitializer.java Mon May 
26 13:42:41 2014
@@ -68,8 +68,9 @@ public class JasperInitializer implement
             }
         }
 
-        // TODO we should play nice and only set this if it's null
-        JspFactory.setDefaultFactory(factory);
+        if (JspFactory.getDefaultFactory() == null) {
+            JspFactory.setDefaultFactory(factory);
+        }
     }
 
     @Override

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1597583&r1=1597582&r2=1597583&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon May 26 13:42:41 2014
@@ -128,6 +128,11 @@
         <bug>56561</bug>: Avoid <code>NoSuchElementException</code> while 
handling
         attributes with empty string value. (violetagg)
       </fix>
+      <scode>
+        Do not configure a <code>JspFactory</code> in the
+        <code>JasperInitializer</code> if one has already been set as might be
+        the case in some embedding scenarios. (markt)
+      </scode>
     </changelog>
   </subsection>
   <subsection name="WebSocket">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to