This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push: new b4f218f644 Consistent synchronization - reported by Coverity b4f218f644 is described below commit b4f218f644a7347596c55a153038630621fb896a Author: Mark Thomas <ma...@apache.org> AuthorDate: Thu Aug 10 15:44:21 2023 +0100 Consistent synchronization - reported by Coverity --- java/org/apache/catalina/core/StandardService.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/java/org/apache/catalina/core/StandardService.java b/java/org/apache/catalina/core/StandardService.java index 7b9a0e601b..a194c3dd6e 100644 --- a/java/org/apache/catalina/core/StandardService.java +++ b/java/org/apache/catalina/core/StandardService.java @@ -266,7 +266,10 @@ public class StandardService extends LifecycleMBeanBase implements Service { */ @Override public Connector[] findConnectors() { - return connectors; + synchronized (connectorsLock) { + // shallow copy + return connectors.clone(); + } } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org