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 5abfb3986f Remove unnecessary code - coyoteRequest cannot be null
5abfb3986f is described below

commit 5abfb3986f2944ef624e4027cf1bf11f2aeb4740
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Aug 10 09:17:33 2023 +0100

    Remove unnecessary code - coyoteRequest cannot be null
---
 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 f65112646a..8c5fb836b4 100644
--- a/java/org/apache/catalina/connector/InputBuffer.java
+++ b/java/org/apache/catalina/connector/InputBuffer.java
@@ -309,9 +309,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;
@@ -551,10 +548,7 @@ public class InputBuffer extends Reader implements 
ByteChunk.ByteInputChannel, A
             return;
         }
 
-        Charset charset = null;
-        if (coyoteRequest != null) {
-            charset = coyoteRequest.getCharset();
-        }
+        Charset charset = coyoteRequest.getCharset();
 
         if (charset == null) {
             if (enc == null) {


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

Reply via email to