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 5d8674535f Expand possible exception types on failure
5d8674535f is described below

commit 5d8674535f4518cccd09d3cf286e31540143699c
Author: Mark Thomas <[email protected]>
AuthorDate: Fri Jun 5 08:30:31 2026 +0100

    Expand possible exception types on failure
    
    IOException observed on vmgump.a.o
---
 .../util/net/ocsp/TestOcspSoftFailInternalError.java     | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git 
a/test/org/apache/tomcat/util/net/ocsp/TestOcspSoftFailInternalError.java 
b/test/org/apache/tomcat/util/net/ocsp/TestOcspSoftFailInternalError.java
index 5d95f1fbea..82ce886cfb 100644
--- a/test/org/apache/tomcat/util/net/ocsp/TestOcspSoftFailInternalError.java
+++ b/test/org/apache/tomcat/util/net/ocsp/TestOcspSoftFailInternalError.java
@@ -16,14 +16,11 @@
  */
 package org.apache.tomcat.util.net.ocsp;
 
-import java.net.SocketException;
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 
-import javax.net.ssl.SSLException;
-import javax.net.ssl.SSLHandshakeException;
-
 import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.Assume;
@@ -34,7 +31,6 @@ import org.junit.runners.Parameterized;
 import org.junit.runners.Parameterized.Parameter;
 import org.junit.runners.Parameterized.Parameters;
 
-import org.apache.tomcat.util.compat.JreCompat;
 import org.apache.tomcat.util.net.ocsp.TesterOcspResponder.OcspResponse;
 
 @RunWith(Parameterized.class)
@@ -104,19 +100,11 @@ public class TestOcspSoftFailInternalError extends 
OcspBaseTest {
             if (handshakeFailureExpected) {
                 Assert.fail("Handshake did not fail when expected to do so.");
             }
-        } catch (SSLHandshakeException | SocketException e) {
+        } catch (IOException e) {
             if (!handshakeFailureExpected) {
                 System.out.println("ZZZ e: " + e);
                 Assert.fail("Handshake failed when not expected to do so.");
             }
-        // Java 8 might throw SSLException instead of SSLHandshakeException
-        } catch (SSLException e) {
-            if (JreCompat.isJre9Available()) {
-                throw(e);
-            }
-            if (!handshakeFailureExpected) {
-                Assert.fail("Handshake failed when not expected to do so.");
-            }
         }
     }
 }


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

Reply via email to