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 <[email protected]>
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: [email protected]
For additional commands, e-mail: [email protected]