-
Bug
-
Resolution: Fixed
-
P4
-
5.0, 6, 7, 8, 11, 13, 14, 15
-
b19
-
x86_64
-
windows_10
A DESCRIPTION OF THE PROBLEM :
In javax.swing.ImageIcon.loadImage(), there is a call to System.out.println() when loading the Image has been interrupted.
In our system, this is a problem because we redirect System.out to be displayed to the user to make sure no errors remain unnoticed.
But in this case, the message does not really represent an error, so we should not display a message.
Therefore, I propose to handle the interrupt using a java.util.logging.Logger and/or restoring the interrupt status.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
It is non-trivial to setup a minimal example that triggers the call to System.out.println, but looking at the source code of ImageIcon.loadImage(), it should be clear how this can happen in principle.
In javax.swing.ImageIcon.loadImage(), there is a call to System.out.println() when loading the Image has been interrupted.
In our system, this is a problem because we redirect System.out to be displayed to the user to make sure no errors remain unnoticed.
But in this case, the message does not really represent an error, so we should not display a message.
Therefore, I propose to handle the interrupt using a java.util.logging.Logger and/or restoring the interrupt status.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
It is non-trivial to setup a minimal example that triggers the call to System.out.println, but looking at the source code of ImageIcon.loadImage(), it should be clear how this can happen in principle.
- duplicates
-
JDK-6421373 ImageIcon does not reassert interrupt status.
-
- Closed
-
- relates to
-
JDK-8320328 Restore interrupted flag in ImageIcon.loadImage
-
- Resolved
-