This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push:
new c19baa0926 Refactor to use a common lock for filters
c19baa0926 is described below
commit c19baa0926981db3dcfc770fdc3b5249518cf54d
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Aug 10 14:25:58 2023 +0100
Refactor to use a common lock for filters
---
java/org/apache/catalina/core/StandardContext.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/java/org/apache/catalina/core/StandardContext.java
b/java/org/apache/catalina/core/StandardContext.java
index b89bd9110f..02f3f7a796 100644
--- a/java/org/apache/catalina/core/StandardContext.java
+++ b/java/org/apache/catalina/core/StandardContext.java
@@ -361,7 +361,7 @@ public class StandardContext extends ContainerBase
implements Context, Notificat
/**
* The set of filter configurations (and associated filter instances) we
have initialized, keyed by filter name.
*/
- private HashMap<String,ApplicationFilterConfig> filterConfigs = new
HashMap<>();
+ private HashMap<String,ApplicationFilterConfig> filterConfigs = new
HashMap<>(); // Guarded by filterDefs
/**
@@ -4317,7 +4317,7 @@ public class StandardContext extends ContainerBase
implements Context, Notificat
}
// Instantiate and record a FilterConfig for each defined filter
boolean ok = true;
- synchronized (filterConfigs) {
+ synchronized (filterDefs) {
filterConfigs.clear();
for (Entry<String,FilterDef> entry : filterDefs.entrySet()) {
String name = entry.getKey();
@@ -4352,7 +4352,7 @@ public class StandardContext extends ContainerBase
implements Context, Notificat
}
// Release all Filter and FilterConfig instances
- synchronized (filterConfigs) {
+ synchronized (filterDefs) {
for (Entry<String,ApplicationFilterConfig> entry :
filterConfigs.entrySet()) {
if (getLogger().isDebugEnabled()) {
getLogger().debug(" Stopping filter '" + entry.getKey() +
"'");
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]