RFR: 8257725: No throws of SSLHandshakeException

Xue-Lei Andrew Fan xuelei at openjdk.java.net
Thu Dec 3 21:06:59 UTC 2020


On Thu, 3 Dec 2020 20:58:55 GMT, Xue-Lei Andrew Fan <xuelei at openjdk.org> wrote:

> In the StatusResponseManager.get() method spec, the SSLHandshakeException is declared as throws exception. However, no such checked-exception would be thrown in the method implementation. 
> 
> /** 
> ... 
>  * @throws SSLHandshakeException if an unsupported 
>  * {@code CertStatusRequest} is provided. 
>  */ 
> Map<X509Certificate, byte[]> get(CertStatusRequestType type, 
>             CertStatusRequest request, X509Certificate[] chain, long delay, 
>             TimeUnit unit) {
> 
> As the exception is a checked-exception, and is not declared in the method, it is safe to remove the throws spec.
> 
> Cleanup only, no new regression test.
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8257725

src/java.base/share/classes/sun/security/ssl/BaseSSLSocketImpl.java line 1:

> 1: /*

This update should be in another branch.  I'm not very sure why it comes into this branch.  I will make sure to get rid of it before integration.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1607



More information about the security-dev mailing list