This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push: new d35c73f6dd Simplify - coyoteResponse can't be null here d35c73f6dd is described below commit d35c73f6dd17a878bdd77116db07de37512c9fdf 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 2249a21395..e1aac60285 100644 --- a/java/org/apache/catalina/connector/OutputBuffer.java +++ b/java/org/apache/catalina/connector/OutputBuffer.java @@ -345,9 +345,6 @@ public class OutputBuffer extends Writer { if (closed) { return; } - if (coyoteResponse == null) { - return; - } // If we really have something to write if (buf.remaining() > 0) { @@ -583,11 +580,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