(tomcat) branch 9.0.x updated: Make default value of interruptThreadThreshold explicit

[email protected]
Newsgroups gmane.comp.jakarta.tomcat.devel
Message-ID <178644506331.1665134.10606736641544010525@gitbox3-he-fi.apache.org>
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/9.0.x by this push:
     new bcd676ad12 Make default value of interruptThreadThreshold explicit
bcd676ad12 is described below

commit bcd676ad1283759b57e11c44e168ba31e64c31e9
Author: lihongyi <[email protected]>
AuthorDate: Sun Aug 2 11:31:37 2026 +0800

    Make default value of interruptThreadThreshold explicit
    
    The interruptThreadThreshold field relied on the Java default of 0
    which disables thread interruption. The Javadoc and valve
    documentation both state the default is -1. Make the default
    explicit (-1) so the code matches the documented behaviour.
---
 java/org/apache/catalina/valves/StuckThreadDetectionValve.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/valves/StuckThreadDetectionValve.java b/java/org/apache/catalina/valves/StuckThreadDetectionValve.java
index d8b004cc76..eb14a32241 100644
--- a/java/org/apache/catalina/valves/StuckThreadDetectionValve.java
+++ b/java/org/apache/catalina/valves/StuckThreadDetectionValve.java
@@ -71,7 +71,7 @@ public class StuckThreadDetectionValve extends ValveBase {
     /**
      * In seconds. Default is -1 to disable interruption.
      */
-    private int interruptThreadThreshold;
+    private int interruptThreadThreshold = -1;
 
     /**
      * The only references we keep to actual running Thread objects are in this Map (which is automatically cleaned in
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.