This is an automated email from the ASF dual-hosted git repository.
markt 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 62a54d4 Deprecate unused Executor method
62a54d4 is described below
commit 62a54d41ec47867d5e368fc76a539f7f33e6ace4
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Jul 21 16:49:18 2021 +0100
Deprecate unused Executor method
This is a precursor to fixing BZ 65454. Removing the unused method
simplifies the code.
---
java/org/apache/catalina/Executor.java | 3 +++
java/org/apache/catalina/core/StandardThreadExecutor.java | 1 +
java/org/apache/tomcat/util/threads/ThreadPoolExecutor.java | 3 +++
3 files changed, 7 insertions(+)
diff --git a/java/org/apache/catalina/Executor.java
b/java/org/apache/catalina/Executor.java
index ba2ef49..b106f54 100644
--- a/java/org/apache/catalina/Executor.java
+++ b/java/org/apache/catalina/Executor.java
@@ -37,6 +37,9 @@ public interface Executor extends
java.util.concurrent.Executor, Lifecycle {
* @throws java.util.concurrent.RejectedExecutionException if this task
* cannot be accepted for execution - the queue is full
* @throws NullPointerException if command or unit is null
+ *
+ * @deprecated Unused. Will be removed in Tomcat 10.1.x onwards.
*/
+ @Deprecated
void execute(Runnable command, long timeout, TimeUnit unit);
}
\ No newline at end of file
diff --git a/java/org/apache/catalina/core/StandardThreadExecutor.java
b/java/org/apache/catalina/core/StandardThreadExecutor.java
index f4f5a90..5e7d4db 100644
--- a/java/org/apache/catalina/core/StandardThreadExecutor.java
+++ b/java/org/apache/catalina/core/StandardThreadExecutor.java
@@ -158,6 +158,7 @@ public class StandardThreadExecutor extends
LifecycleMBeanBase
@Override
+ @Deprecated
public void execute(Runnable command, long timeout, TimeUnit unit) {
if (executor != null) {
executor.execute(command,timeout,unit);
diff --git a/java/org/apache/tomcat/util/threads/ThreadPoolExecutor.java
b/java/org/apache/tomcat/util/threads/ThreadPoolExecutor.java
index b3fab86..2b9e931 100644
--- a/java/org/apache/tomcat/util/threads/ThreadPoolExecutor.java
+++ b/java/org/apache/tomcat/util/threads/ThreadPoolExecutor.java
@@ -166,7 +166,10 @@ public class ThreadPoolExecutor extends
java.util.concurrent.ThreadPoolExecutor
* @throws RejectedExecutionException if this task cannot be
* accepted for execution - the queue is full
* @throws NullPointerException if command or unit is null
+ *
+ * @deprecated This will be removed in Tomcat 10.1.x onwards
*/
+ @Deprecated
public void execute(Runnable command, long timeout, TimeUnit unit) {
submittedCount.incrementAndGet();
try {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]