This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/11.0.x by this push:
new 119ca0b949 Fix potential thread safety issue
119ca0b949 is described below
commit 119ca0b9497bd7af40bba49c84b444dd9af241c4
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]