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
The following commit(s) were added to refs/heads/9.0.x by this push:
new 240dad8c79 Simplify - coyoteResponse can't be null here
240dad8c79 is described below
commit 240dad8c79a924b85d5ae453471d6a62e6bf423b
Author: Mark Thomas <[email protected]>
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 363bcf3de5..2e84183873 100644
--- a/java/org/apache/catalina/connector/OutputBuffer.java
+++ b/java/org/apache/catalina/connector/OutputBuffer.java
@@ -327,9 +327,6 @@ public class OutputBuffer extends Writer {
if (closed) {
return;
}
- if (coyoteResponse == null) {
- return;
- }
// If we really have something to write
if (buf.remaining() > 0) {
@@ -554,11 +551,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: [email protected]
For additional commands, e-mail: [email protected]