You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2021/07/21 15:52:19 UTC

[tomcat] branch 10.0.x updated: Deprecate unused Executor method

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.0.x by this push:
     new f984f54  Deprecate unused Executor method
f984f54 is described below

commit f984f54a63da5de112b361a717d3852866d1c4c7
Author: Mark Thomas <ma...@apache.org>
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org