On Fri, 11 Apr 2025 02:25:20 GMT, Stuart Marks <sma...@openjdk.org> wrote:

>> I disagree. IMO, for a test library, it's an unnecessary burden to make 
>> callers catch a checked exception.
>
> Hm. In general, if something blocks interruptibly, it should be declared to 
> throw InterruptedException instead of catching and rethrowing something of 
> another exception type. We should look at the use sites to be sure, but it's 
> generally not an inconvenience for tests to deal with checked exceptions; 
> it's perfectly acceptable for them to declare `throws InterruptedException` 
> or even `throws Exception` and let the framework handle the exception if the 
> test itself doesn't want to.

Thanks, Stuart. I've updated the new method to throw `InterruptedException`, 
and pass the exception from `InvocationTargetException` on through.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24527#discussion_r2040243940

Reply via email to