(tomcat) branch main updated: Make default value of interruptThreadThreshold explicit

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

markt-asf 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 8a5e70dbd4 Make default value of interruptThreadThreshold explicit
8a5e70dbd4 is described below

commit 8a5e70dbd4e7c4f6e16e0e5968776b9c58b014a2
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 9134fda5a8..9302697de5 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.