This is an automated email from the ASF dual-hosted git repository.

markt-asf 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 0b201e4848 Additional location where ISE needs to be caught for Java 25
0b201e4848 is described below

commit 0b201e48487c0952b6c70046ca13b8f992eac3aa
Author: Mark Thomas <[email protected]>
AuthorDate: Tue Sep 15 16:17:57 2026 +0100

    Additional location where ISE needs to be caught for Java 25
---
 java/org/apache/tomcat/websocket/PerMessageDeflate.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/websocket/PerMessageDeflate.java 
b/java/org/apache/tomcat/websocket/PerMessageDeflate.java
index d1b0dd110a..a682d21666 100644
--- a/java/org/apache/tomcat/websocket/PerMessageDeflate.java
+++ b/java/org/apache/tomcat/websocket/PerMessageDeflate.java
@@ -638,7 +638,8 @@ public class PerMessageDeflate implements Transformation {
                         int eomBufferWritten;
                         try {
                             eomBufferWritten = deflater.deflate(EOM_BUFFER, 0, 
EOM_BUFFER.length, Deflater.SYNC_FLUSH);
-                        } catch (NullPointerException e) {
+                        } catch (IllegalStateException | NullPointerException 
e) {
+                            // As of Java 25, the JRE throws an ISE rather 
than an NPE
                             throw new 
IOException(sm.getString("perMessageDeflate.alreadyClosed"), e);
                         }
                         if (eomBufferWritten < EOM_BUFFER.length) {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to