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

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

commit b87bb5f4b96dc70e2421881413a9335069e416b4
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Mar 22 16:16:03 2021 +0000

    Cosmetic clean-up. Better comments.
---
 java/org/apache/coyote/Response.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/coyote/Response.java 
b/java/org/apache/coyote/Response.java
index 65fc3c7..99d3324 100644
--- a/java/org/apache/coyote/Response.java
+++ b/java/org/apache/coyote/Response.java
@@ -51,9 +51,9 @@ import org.apache.tomcat.util.res.StringManager;
 public final class Response {
 
     private static final StringManager sm = 
StringManager.getManager(Response.class);
-
     private static final Log log = LogFactory.getLog(Response.class);
 
+
     // ----------------------------------------------------- Class Variables
 
     /**
@@ -686,13 +686,16 @@ public final class Response {
      * need access to state.
      */
     volatile WriteListener listener;
+    // Ensures listener is only fired after a call is isReady()
     private boolean fireListener = false;
+    // Tracks write registration to prevent duplicate registrations
     private boolean registeredForWrite = false;
+    // Lock used to manage concurrent access to above flags
     private final Object nonBlockingStateLock = new Object();
 
     public WriteListener getWriteListener() {
         return listener;
-}
+    }
 
     public void setWriteListener(WriteListener listener) {
         if (listener == null) {

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to