RFR: 8236987: Remove call to System.out.println from ImageIcon.loadImage [v5]
Alexey Ivanov
aivanov at openjdk.java.net
Wed Mar 23 18:22:31 UTC 2022
On Wed, 23 Mar 2022 13:55:11 GMT, Tejesh R <duke at openjdk.java.net> wrote:
>> Removed the println() line from the Interrupted catch block. Since waitForID() Interrupt indicates completion of Image Loading, println as Interrupt handling was not required.
>
> Tejesh R has updated the pull request incrementally with one additional commit since the last revision:
>
> Updated based on review comments
It looks good now.
Is it possible to add a regression test? We have one now, don't we? It just needs to be done as a jtreg automated test which verifies the status is any of the _done_ statuses, not `LOADING`.
A more complicated test could also verify the printed message is gone.
src/java.desktop/share/classes/javax/swing/ImageIcon.java line 338:
> 336: mTracker.removeImage(image, id);
> 337:
> 338: if (interrupted && ((loadStatus & MediaTracker.LOADING )!= 0)) {
Suggestion:
if (interrupted && ((loadStatus & MediaTracker.LOADING ) != 0)) {
There should be one space on either side of a binary operator.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7754
More information about the client-libs-dev
mailing list