RFR: 8236987: Remove call to System.out.println from ImageIcon.loadImage [v11]
Alexey Ivanov
aivanov at openjdk.java.net
Tue Apr 5 21:17:40 UTC 2022
On Tue, 5 Apr 2022 17:01:13 GMT, Phil Race <prr at 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
More information about the client-libs-dev
mailing list