This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 460f51ef3557ce842340181e9c3fa426bd6f075e 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 20eea91..1a0f0f9 100644 --- a/java/org/apache/coyote/Response.java +++ b/java/org/apache/coyote/Response.java @@ -50,9 +50,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 /** @@ -669,13 +669,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