You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/11/04 17:10:23 UTC
[tomcat] branch master updated: Fix a possible race condition
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push:
new 5e9f6fd Fix a possible race condition
5e9f6fd is described below
commit 5e9f6fd6a9ecab3a7fb248ef35995d6cc585f6ed
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Nov 4 17:09:59 2019 +0000
Fix a possible race condition
---
java/org/apache/jasper/JspCompilationContext.java | 4 +++-
webapps/docs/changelog.xml | 4 ++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/java/org/apache/jasper/JspCompilationContext.java b/java/org/apache/jasper/JspCompilationContext.java
index bdf669b..16b1076 100644
--- a/java/org/apache/jasper/JspCompilationContext.java
+++ b/java/org/apache/jasper/JspCompilationContext.java
@@ -82,7 +82,9 @@ public class JspCompilationContext {
private volatile boolean removed = false;
- private URLClassLoader jspLoader;
+ // volatile so changes are visible when multiple threads request a JSP file
+ // that has been modified
+ private volatile URLClassLoader jspLoader;
private URL baseUrl;
private Class<?> servletClass;
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 9f46cb5..a800015 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -125,6 +125,10 @@
condition if the JSP is modified during compilation. Patch provided by
Karl von Randow. (markt)
</fix>
+ <fix>
+ Fix a race condition that could mean changes to a modified JSP were not
+ visible to end users. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Web applications">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org