On Tue, 5 Apr 2022 17:01:13 GMT, Phil Race <p...@openjdk.org> wrote:

>> Tejesh R has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Updated based on Reiview comments
>
> test/jdk/javax/swing/ImageIcon/LoadInterruptTest.java line 73:
> 
>> 71:         setUpOutput();
>> 72: 
>> 73:         Thread.currentThread().interrupt();
> 
> really I am unclear if calling interrupt() even before creating the ImageIcon 
> is guaranteed to do what you want .. how are you sure there will be no 
> unexpected consequences.

It's specified by 
[`Object.wait`](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long)):

> @throws InterruptedException if any thread interrupted the current thread 
> _before or
> while_ the current thread was waiting. The <em>interrupted status</em> of the
> current thread is cleared when this exception is thrown.

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

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

Reply via email to