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
commit b6ace6f2274298ceec3d1de762b95d109e4aa695 Author: Mark Thomas <ma...@apache.org> AuthorDate: Tue Dec 7 10:01:10 2021 +0000 Avoid NPE (observed when running tests) --- java/org/apache/tomcat/util/net/NioBlockingSelector.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/java/org/apache/tomcat/util/net/NioBlockingSelector.java b/java/org/apache/tomcat/util/net/NioBlockingSelector.java index 3199d04..3a629d3 100644 --- a/java/org/apache/tomcat/util/net/NioBlockingSelector.java +++ b/java/org/apache/tomcat/util/net/NioBlockingSelector.java @@ -91,6 +91,9 @@ public class NioBlockingSelector { reference = new KeyReference(); } NioSocketWrapper att = (NioSocketWrapper) key.attachment(); + if (att == null) { + throw new IOException(); + } if (att.previousIOException != null) { /* * Socket has previously seen an IOException on write. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org