RFR 8251715 : Throw UncheckedIOException in place of InternalError when HttpClient fails due to unavailability of underlying resources required by SSLContext.

Chris Hegarty chris.hegarty at oracle.com
Tue Aug 18 13:28:36 UTC 2020


Rahul,

> On 18 Aug 2020, at 10:21, Rahul Yadav <rahul.r.yadav at oracle.com> wrote:
> 
> ...
> 
> Issue:  https://bugs.openjdk.java.net/browse/JDK-8251715
> webrev: http://cr.openjdk.java.net/~ryadav/webrev_8251715/index.html
> 
This looks good.

In the test, i see that you have used expectThrows. expectThrows returns the exception ( after the type check has occurred ), it is possible to do further checking on it, like say for example examining its cause, or exception message. Unless you do further checking or diagnostic output, then there is not much difference between assertThrows and expectThrows.  Maybe you mean to check the cause for NoSuchAlgorithmException?

-Chris.



More information about the net-dev mailing list