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 2026/05/13 09:46:36 UTC
(tomcat) branch main updated: Fix potential thread safety issue
This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new e673107ce9 Fix potential thread safety issue
e673107ce9 is described below
commit e673107ce98e0f6aa295135f0e36656497ed6f6c
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed May 13 10:46:05 2026 +0100
Fix potential thread safety issue
---
java/org/apache/catalina/startup/HostConfig.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/java/org/apache/catalina/startup/HostConfig.java b/java/org/apache/catalina/startup/HostConfig.java
index c378e3ea86..2670b33f1a 100644
--- a/java/org/apache/catalina/startup/HostConfig.java
+++ b/java/org/apache/catalina/startup/HostConfig.java
@@ -24,8 +24,8 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.nio.file.Files;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
@@ -149,17 +149,17 @@ public class HostConfig implements LifecycleListener {
/**
* The list of descriptors in the appBase to be ignored because they are invalid (e.g. contain /../ sequences).
*/
- protected final Set<String> invalidDescriptors = new HashSet<>();
+ protected final Set<String> invalidDescriptors = Collections.newSetFromMap(new ConcurrentHashMap<>());
/**
* The list of directories in the appBase to be ignored because they are invalid (e.g. contain /../ sequences).
*/
- protected final Set<String> invalidDirectories = new HashSet<>();
+ protected final Set<String> invalidDirectories = Collections.newSetFromMap(new ConcurrentHashMap<>());
/**
* The list of Wars in the appBase to be ignored because they are invalid (e.g. contain /../ sequences).
*/
- protected final Set<String> invalidWars = new HashSet<>();
+ protected final Set<String> invalidWars = Collections.newSetFromMap(new ConcurrentHashMap<>());
// ------------------------------------------------------------- Properties
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org