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

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

commit b62f70fe590016cca993ea078f2ebdedadaf46ff
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Aug 9 20:08:39 2023 +0100

    Remove unnecessary code
---
 java/org/apache/catalina/connector/InputBuffer.java | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/java/org/apache/catalina/connector/InputBuffer.java 
b/java/org/apache/catalina/connector/InputBuffer.java
index f6160311d4..3c195102cc 100644
--- a/java/org/apache/catalina/connector/InputBuffer.java
+++ b/java/org/apache/catalina/connector/InputBuffer.java
@@ -285,9 +285,6 @@ public class InputBuffer extends Reader implements 
ByteChunk.ByteInputChannel, A
         if (closed) {
             return -1;
         }
-        if (coyoteRequest == null) {
-            return -1;
-        }
 
         if (state == INITIAL_STATE) {
             state = BYTE_STATE;
@@ -519,10 +516,7 @@ public class InputBuffer extends Reader implements 
ByteChunk.ByteInputChannel, A
             return;
         }
 
-        Charset charset = null;
-        if (coyoteRequest != null) {
-            charset = coyoteRequest.getCharsetHolder().getValidatedCharset();
-        }
+        Charset charset = 
coyoteRequest.getCharsetHolder().getValidatedCharset();
 
         if (charset == null) {
             charset = org.apache.coyote.Constants.DEFAULT_BODY_CHARSET;


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

Reply via email to