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 f04b621e2e Simplify
f04b621e2e is described below
commit f04b621e2e455137e32bd80024ad4fef2f60916b
Author: remm <[email protected]>
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: [email protected]
For additional commands, e-mail: [email protected]