Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8236987

Remove call to System.out.println from ImageIcon.loadImage

XMLWordPrintable

    • 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.


            tr Tejesh R
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: