This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push: new 677e23a847 Simplify 677e23a847 is described below commit 677e23a847cb6d51cfb0545fb13227b23a2da79f 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 b3575d909d..1c5c8ab1ba 100644 --- a/java/org/apache/catalina/core/StandardServer.java +++ b/java/org/apache/catalina/core/StandardServer.java @@ -143,13 +143,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