This is an automated email from the ASF dual-hosted git repository. remm 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 b40a986c6f Sync in needed to iterate safely over Collections.synchronizedList b40a986c6f is described below commit b40a986c6fd0dbb34e8cebbdc8ccd1c8c6ba7bec Author: remm <r...@apache.org> AuthorDate: Tue Sep 3 11:35:37 2024 +0200 Sync in needed to iterate safely over Collections.synchronizedList As a result it is likely simpler to use CopyOnWriteArrayList instead. Also make types more explicit (see if it makes Coverity happier). --- java/org/apache/catalina/servlets/WebdavServlet.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java b/java/org/apache/catalina/servlets/WebdavServlet.java index 60076f8b27..f3280fde49 100644 --- a/java/org/apache/catalina/servlets/WebdavServlet.java +++ b/java/org/apache/catalina/servlets/WebdavServlet.java @@ -218,7 +218,7 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen * Key : path <br> * Value : LockInfo */ - private final Map<String,LockInfo> resourceLocks = new ConcurrentHashMap<>(); + private final ConcurrentHashMap<String,LockInfo> resourceLocks = new ConcurrentHashMap<>(); /** @@ -228,13 +228,13 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen * Value : List of lock-null resource which are members of the collection. Each element of the List is the path * associated with the lock-null resource. */ - private final Map<String,List<String>> lockNullResources = new ConcurrentHashMap<>(); + private final ConcurrentHashMap<String,CopyOnWriteArrayList<String>> lockNullResources = new ConcurrentHashMap<>(); /** * List of the inheritable collection locks. */ - private final List<LockInfo> collectionLocks = Collections.synchronizedList(new ArrayList<>()); + private final CopyOnWriteArrayList<LockInfo> collectionLocks = new CopyOnWriteArrayList<>(); /** --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org