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 26d549102f Remove unnecessary code - coyoteRequest cannot be null 26d549102f is described below commit 26d549102f015fc3e9138b9ac374dbda92d6fa35 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 3bffaf74d1..97d7fbd87d 100644 --- a/java/org/apache/catalina/connector/InputBuffer.java +++ b/java/org/apache/catalina/connector/InputBuffer.java @@ -301,9 +301,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; @@ -531,10 +528,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) { 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