This is an automated email from the ASF dual-hosted git repository.
markt-asf 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 e04fe33276 Additional locations where ISE needs to be caught for Java
25
e04fe33276 is described below
commit e04fe332764cf8ca6ba4cb94c651ea90c4dda5d9
Author: Mark Thomas <[email protected]>
AuthorDate: Tue Sep 15 16:19:45 2026 +0100
Additional locations where ISE needs to be caught for Java 25
---
java/org/apache/tomcat/websocket/PerMessageDeflate.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/java/org/apache/tomcat/websocket/PerMessageDeflate.java
b/java/org/apache/tomcat/websocket/PerMessageDeflate.java
index 3c7209f1ce..c879cbe167 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) {
@@ -690,7 +691,8 @@ public class PerMessageDeflate implements Transformation {
if (isServer && !serverContextTakeover || !isServer &&
!clientContextTakeover) {
try {
deflater.reset();
- } 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);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]