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

rmaucher 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 baea326de5 Fix inverted isDone in returned Future
baea326de5 is described below

commit baea326de5f9bd0d6ad1f54c83f40feb218c9b70
Author: remm <[email protected]>
AuthorDate: Tue May 19 12:50:35 2026 +0200

    Fix inverted isDone in returned Future
    
    Identified by my code scanning.
---
 java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java | 2 +-
 webapps/docs/changelog.xml                                      | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java 
b/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java
index 9d5d75e8b7..8e7c82430b 100644
--- a/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java
+++ b/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java
@@ -479,7 +479,7 @@ public class AsyncChannelWrapperSecure implements 
AsyncChannelWrapper {
 
         @Override
         public final boolean isDone() {
-            return completionLatch.getCount() > 0;
+            return completionLatch.getCount() == 0;
         }
 
         @Override
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 86f1021dff..fa32a9c35e 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -368,6 +368,10 @@
         <code>Writer</code> and <code>OutputStream</code>. (markt)
       </fix>
       <!-- Entries for backport and removal before 12.0.0-M1 below this line 
-->
+      <fix>
+        Incorrect <code>Future.isDone()</code> return by
+        <code>AsyncChannelWrapperSecure</code>. (remm)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Web applications">


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to