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 646962853a Remove unnecessary code - coyoteRequest cannot be null
646962853a is described below
commit 646962853a3baa893c70414dcd15390c298b8be2
Author: Mark Thomas <[email protected]>
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 00a95a8620..739507a0ea 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: [email protected]
For additional commands, e-mail: [email protected]