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

markt 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 eadca74f9f Simplify - coyoteResponse can't be null here
eadca74f9f is described below

commit eadca74f9fcf5ab4c568ec6e9c8660e1090a987e
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Aug 9 19:15:05 2023 +0100

    Simplify - coyoteResponse can't be null here
---
 java/org/apache/catalina/connector/OutputBuffer.java | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/java/org/apache/catalina/connector/OutputBuffer.java 
b/java/org/apache/catalina/connector/OutputBuffer.java
index fbc638bf05..31b29b00cb 100644
--- a/java/org/apache/catalina/connector/OutputBuffer.java
+++ b/java/org/apache/catalina/connector/OutputBuffer.java
@@ -323,9 +323,6 @@ public class OutputBuffer extends Writer {
         if (closed) {
             return;
         }
-        if (coyoteResponse == null) {
-            return;
-        }
 
         // If we really have something to write
         if (buf.remaining() > 0) {
@@ -550,11 +547,7 @@ public class OutputBuffer extends Writer {
             return;
         }
 
-        Charset charset = null;
-
-        if (coyoteResponse != null) {
-            charset = coyoteResponse.getCharset();
-        }
+        Charset charset = coyoteResponse.getCharset();
 
         if (charset == null) {
             if (coyoteResponse.getCharacterEncoding() != null) {


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

Reply via email to