RFR: 8236987: Remove call to System.out.println from ImageIcon.loadImage
Prasanta Sadhukhan
psadhukhan at openjdk.java.net
Thu Mar 10 13:02:47 UTC 2022
On Wed, 9 Mar 2022 10:04:09 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.
src/java.desktop/share/classes/javax/swing/ImageIcon.java line 331:
> 329: mTracker.waitForID(id, 0);
> 330: } catch (InterruptedException e) {
> 331: System.out.println("INTERRUPTED while loading Image");
should be ok. Only question is, should we set the Thread interrupt flag or MediaTracker ABORTED flag too here but seems like this file does not check for error status after calling loadImage and it's been there for long so it might affect existing application using ImageIcon.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7754
More information about the client-libs-dev
mailing list