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

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

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


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

commit 25bbd8ed0cfc8cd77310ee740af7766488059f72
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 d34f1fa8e7..719a2f5d99 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.