This is an automated email from the ASF dual-hosted git repository. remm 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 ec622c79fd Simplify ec622c79fd is described below commit ec622c79fd2688eee53f9d04d310322c7dea3227 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 e964fe8386..58c1608c15 100644 --- a/java/org/apache/catalina/core/StandardServer.java +++ b/java/org/apache/catalina/core/StandardServer.java @@ -139,13 +139,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