On Thu, 10 Dec 2020 08:56:25 GMT, Kim Barrett <kbarr...@openjdk.org> wrote:
>> I understand that the test code previously just forwarded the >> `InterruptedException` if it happened in the `Thread.sleep()` call too. So >> this may only be an exiting issue and please ignore this comment. >> Not catching `InterruptedException` here only seems to be a cause for >> unnecessary failure. Then again, it probably does not happen a lot. > > Nothing in the test calls Thread.interrupt(), so there isn't a risk of > failure due to not handling that exception in some "interesting" way. But > InterruptedException must be "handled" somehow, because it's a checked > exception. That's already dealt with by the run() method declaring that it > throws that type, and main declaring that it throws Exception. The other > tests modified in this change don't take that approach (just let it > propagate out through main), instead wrapping the interruptable calls in > try/catch, though again just to satisfy the requirement that a checked > exception must be statically verified to be handled, even though there > aren't going to be any thrown. Okay. ------------- PR: https://git.openjdk.java.net/jdk/pull/1691