This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push: new 497b8d3512 Refactor to use a common lock for filters 497b8d3512 is described below commit 497b8d3512fcdf99558fd0a2898a0b742af340e9 Author: Mark Thomas <ma...@apache.org> 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 3d03b12d97..d038e18460 100644 --- a/java/org/apache/catalina/core/StandardContext.java +++ b/java/org/apache/catalina/core/StandardContext.java @@ -362,7 +362,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 Map<String,ApplicationFilterConfig> filterConfigs = new HashMap<>(); + private Map<String,ApplicationFilterConfig> filterConfigs = new HashMap<>(); // Guarded by filterDefs /** @@ -4338,7 +4338,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(); @@ -4373,7 +4373,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: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org