horwat 01/01/24 12:26:39
Modified: jasper/src/share/org/apache/jasper/compiler
JspParseEventListener.java
Log:
Fix _jspx_init() thread safety
BR 157
Revision Changes Path
1.21 +11 -3
jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java
Index: JspParseEventListener.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- JspParseEventListener.java 2000/12/22 18:37:39 1.20
+++ JspParseEventListener.java 2001/01/24 20:26:39 1.21
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
1.20 2000/12/22 18:37:39 pierred Exp $
- * $Revision: 1.20 $
- * $Date: 2000/12/22 18:37:39 $
+ * $Header:
/home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
1.21 2001/01/24 20:26:39 horwat Exp $
+ * $Revision: 1.21 $
+ * $Date: 2001/01/24 20:26:39 $
*
* ====================================================================
*
@@ -333,8 +333,16 @@
writer.println();
writer.println("if (_jspx_inited == false) {");
writer.pushIndent();
+ writer.println("synchronized (this) {");
+ writer.pushIndent();
+ writer.println("if (_jspx_inited == false) {");
+ writer.pushIndent();
writer.println("_jspx_init();");
writer.println("_jspx_inited = true;");
+ writer.popIndent();
+ writer.println("}");
+ writer.popIndent();
+ writer.println("}");
writer.popIndent();
writer.println("}");
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]