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 419cf0f040 Superclass call
419cf0f040 is described below
commit 419cf0f040a1be5de927dcf419ac602212abfc1b
Author: remm <[email protected]>
AuthorDate: Wed Sep 13 17:06:42 2023 +0200
Superclass call
Found by coverity.
---
java/org/apache/catalina/valves/SemaphoreValve.java | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/java/org/apache/catalina/valves/SemaphoreValve.java
b/java/org/apache/catalina/valves/SemaphoreValve.java
index ebb6bd42d1..34e0a54053 100644
--- a/java/org/apache/catalina/valves/SemaphoreValve.java
+++ b/java/org/apache/catalina/valves/SemaphoreValve.java
@@ -22,7 +22,6 @@ import java.util.concurrent.Semaphore;
import jakarta.servlet.ServletException;
import org.apache.catalina.LifecycleException;
-import org.apache.catalina.LifecycleState;
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
@@ -123,10 +122,8 @@ public class SemaphoreValve extends ValveBase {
*/
@Override
protected synchronized void startInternal() throws LifecycleException {
-
semaphore = new Semaphore(concurrency, fairness);
-
- setState(LifecycleState.STARTING);
+ super.startInternal();
}
@@ -139,9 +136,7 @@ public class SemaphoreValve extends ValveBase {
*/
@Override
protected synchronized void stopInternal() throws LifecycleException {
-
- setState(LifecycleState.STOPPING);
-
+ super.stopInternal();
semaphore = null;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]