Author: aogburn
Date: 2015-03-26 15:24:30 -0400 (Thu, 26 Mar 2015)
New Revision: 2600
Modified:
branches/2.1.x/java/org/apache/jasper/compiler/JspConfig.java
Log:
[JBWEB-311] make JspConfig.init thread safe
Modified: branches/2.1.x/java/org/apache/jasper/compiler/JspConfig.java
===================================================================
--- branches/2.1.x/java/org/apache/jasper/compiler/JspConfig.java 2015-03-18 16:25:19 UTC
(rev 2599)
+++ branches/2.1.x/java/org/apache/jasper/compiler/JspConfig.java 2015-03-26 19:24:30 UTC
(rev 2600)
@@ -215,13 +215,17 @@
private void init() throws JasperException {
if (!initialized) {
- processWebDotXml(ctxt);
- defaultJspProperty = new JspProperty(defaultIsXml,
- defaultIsELIgnored,
- defaultIsScriptingInvalid,
- null, null, null, defaultDeferedSyntaxAllowedAsLiteral,
- defaultTrimDirectiveWhitespaces);
- initialized = true;
+ synchronized (this) {
+ if (!initialized) {
+ processWebDotXml(ctxt);
+ defaultJspProperty = new JspProperty(defaultIsXml,
+ defaultIsELIgnored,
+ defaultIsScriptingInvalid,
+ null, null, null, defaultDeferedSyntaxAllowedAsLiteral,
+ defaultTrimDirectiveWhitespaces);
+ initialized = true;
+ }
+ }
}
}
Show replies by date