[tomcat] branch main updated: Avoid NPE (observed in NIO2 tests)

2022-09-01 Thread markt
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


The following commit(s) were added to refs/heads/main by this push:
 new b51d2351cb Avoid NPE (observed in NIO2 tests)
b51d2351cb is described below

commit b51d2351cbee79eb219ac5e6158a9c3a6f345eb3
Author: Mark Thomas 
AuthorDate: Thu Sep 1 13:50:53 2022 +0100

Avoid NPE (observed in NIO2 tests)
---
 java/org/apache/coyote/http11/filters/BufferedInputFilter.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/coyote/http11/filters/BufferedInputFilter.java 
b/java/org/apache/coyote/http11/filters/BufferedInputFilter.java
index 5bfe6c9c61..7aa9f2da78 100644
--- a/java/org/apache/coyote/http11/filters/BufferedInputFilter.java
+++ b/java/org/apache/coyote/http11/filters/BufferedInputFilter.java
@@ -120,7 +120,7 @@ public class BufferedInputFilter implements InputFilter, 
ApplicationBufferHandle
 @Override
 public void recycle() {
 if (buffered != null) {
-if (buffered.getBuffer().length > 65536) {
+if (buffered.getBuffer() != null && buffered.getBuffer().length > 
65536) {
 buffered = null;
 } else {
 buffered.recycle();


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



[tomcat] branch 10.0.x updated: Avoid NPE (observed in NIO2 tests)

2022-09-01 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.0.x by this push:
 new c5a1764d66 Avoid NPE (observed in NIO2 tests)
c5a1764d66 is described below

commit c5a1764d66387a10b0553882319752371a44f583
Author: Mark Thomas 
AuthorDate: Thu Sep 1 13:50:53 2022 +0100

Avoid NPE (observed in NIO2 tests)
---
 java/org/apache/coyote/http11/filters/BufferedInputFilter.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/coyote/http11/filters/BufferedInputFilter.java 
b/java/org/apache/coyote/http11/filters/BufferedInputFilter.java
index 5bfe6c9c61..7aa9f2da78 100644
--- a/java/org/apache/coyote/http11/filters/BufferedInputFilter.java
+++ b/java/org/apache/coyote/http11/filters/BufferedInputFilter.java
@@ -120,7 +120,7 @@ public class BufferedInputFilter implements InputFilter, 
ApplicationBufferHandle
 @Override
 public void recycle() {
 if (buffered != null) {
-if (buffered.getBuffer().length > 65536) {
+if (buffered.getBuffer() != null && buffered.getBuffer().length > 
65536) {
 buffered = null;
 } else {
 buffered.recycle();


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



[tomcat] branch 9.0.x updated: Avoid NPE (observed in NIO2 tests)

2022-09-01 Thread markt
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 138324856f Avoid NPE (observed in NIO2 tests)
138324856f is described below

commit 138324856fb70ce9c898a303b901f0cf08f268e2
Author: Mark Thomas 
AuthorDate: Thu Sep 1 13:50:53 2022 +0100

Avoid NPE (observed in NIO2 tests)
---
 java/org/apache/coyote/http11/filters/BufferedInputFilter.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/coyote/http11/filters/BufferedInputFilter.java 
b/java/org/apache/coyote/http11/filters/BufferedInputFilter.java
index 5bfe6c9c61..7aa9f2da78 100644
--- a/java/org/apache/coyote/http11/filters/BufferedInputFilter.java
+++ b/java/org/apache/coyote/http11/filters/BufferedInputFilter.java
@@ -120,7 +120,7 @@ public class BufferedInputFilter implements InputFilter, 
ApplicationBufferHandle
 @Override
 public void recycle() {
 if (buffered != null) {
-if (buffered.getBuffer().length > 65536) {
+if (buffered.getBuffer() != null && buffered.getBuffer().length > 
65536) {
 buffered = null;
 } else {
 buffered.recycle();


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



[tomcat] branch 8.5.x updated: Avoid NPE (observed in NIO2 tests)

2022-09-01 Thread markt
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 e886ee2018 Avoid NPE (observed in NIO2 tests)
e886ee2018 is described below

commit e886ee20183b5f5d2a902843b6d324b58d991ea8
Author: Mark Thomas 
AuthorDate: Thu Sep 1 13:50:53 2022 +0100

Avoid NPE (observed in NIO2 tests)
---
 java/org/apache/coyote/http11/filters/BufferedInputFilter.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/coyote/http11/filters/BufferedInputFilter.java 
b/java/org/apache/coyote/http11/filters/BufferedInputFilter.java
index 04b5b53be3..34321b351a 100644
--- a/java/org/apache/coyote/http11/filters/BufferedInputFilter.java
+++ b/java/org/apache/coyote/http11/filters/BufferedInputFilter.java
@@ -137,7 +137,7 @@ public class BufferedInputFilter implements InputFilter, 
ApplicationBufferHandle
 @Override
 public void recycle() {
 if (buffered != null) {
-if (buffered.getBuffer().length > 65536) {
+if (buffered.getBuffer() != null && buffered.getBuffer().length > 
65536) {
 buffered = null;
 } else {
 buffered.recycle();


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