Skip to content

Commit

Permalink
MMA-11014: Wrap correct exception
Browse files Browse the repository at this point in the history
  • Loading branch information
srpanwar-confluent committed Sep 17, 2021
1 parent 9e7c45f commit 6fa4e87
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/src/test/java/io/confluent/rest/SslTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,11 @@ public void testHttpsWithAuthAndBadClientCert() throws Exception {
try {
makeGetRequest(uri + "/test",
untrustedClient.getAbsolutePath(), SSL_PASSWORD, SSL_PASSWORD);
} catch (SSLHandshakeException she) { // handle a transient failure.
throw new SocketException(she.getMessage());
} catch (SSLException e) { // handle a transient failure.
// JDK7 will throw SSLHandshakeException
// JDK8 will throw the SocketException
// JDK11 will throw the SSLException
throw new SocketException(e.toString());
}
} finally {
app.stop();
Expand Down

0 comments on commit 6fa4e87

Please sign in to comment.