This is an automated email from the ASF dual-hosted git repository. remm 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 31c52a5296 Simplify 31c52a5296 is described below commit 31c52a5296127d7722a84c70e0e4c57ddc28f52d Author: remm <r...@apache.org> AuthorDate: Tue Aug 20 13:54:40 2024 +0200 Simplify This seems to confusing coverity which no longer associates the two locks. --- java/org/apache/catalina/core/StandardServer.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/java/org/apache/catalina/core/StandardServer.java b/java/org/apache/catalina/core/StandardServer.java index bc180007c6..6ce60aa178 100644 --- a/java/org/apache/catalina/core/StandardServer.java +++ b/java/org/apache/catalina/core/StandardServer.java @@ -138,13 +138,9 @@ public final class StandardServer extends LifecycleMBeanBase implements Server { */ private Service[] services = new Service[0]; - private final Lock servicesReadLock; - private final Lock servicesWriteLock; - { - ReentrantReadWriteLock servicesLock = new ReentrantReadWriteLock(); - servicesReadLock = servicesLock.readLock(); - servicesWriteLock = servicesLock.writeLock(); - } + private final ReentrantReadWriteLock servicesLock = new ReentrantReadWriteLock(); + private final Lock servicesReadLock = servicesLock.readLock(); + private final Lock servicesWriteLock = servicesLock.writeLock(); /** * The shutdown command string we are looking for. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org