This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push:
new ac6ef51b78 Superclass call
ac6ef51b78 is described below
commit ac6ef51b78358633b0366f9663ff3572be238a7b
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 67d26da643..6715533989 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 javax.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]