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

commit cb4e29509700b837e056cca3c96cb2707ce93c77
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Fri Oct 16 14:21:52 2020 +0100

    SpotBugs - Fix possible NPE
---
 java/org/apache/catalina/ha/backend/TcpSender.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/ha/backend/TcpSender.java 
b/java/org/apache/catalina/ha/backend/TcpSender.java
index 5676c88..7e1bda9 100644
--- a/java/org/apache/catalina/ha/backend/TcpSender.java
+++ b/java/org/apache/catalina/ha/backend/TcpSender.java
@@ -151,7 +151,7 @@ public class TcpSender
                 // read all the headers.
                 String header = connectionReaders[i].readLine();
                 int contentLength = 0;
-                while (!header.isEmpty()) {
+                while (header != null && !header.isEmpty()) {
                     int colon = header.indexOf(':');
                     String headerName = header.substring(0, colon).trim();
                     String headerValue = header.substring(colon + 1).trim();


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

Reply via email to