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

new ImageIcon(null,"someDescription") causes the image fetching thread to fail

XMLWordPrintable

    • generic, x86
    • generic, windows_2000

      Name: skT45625 Date: 07/31/2000


      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
      Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)


      Calling new ImageIcon(null,"test") one gets a

      Uncaught error fetching image: java.lang.NullPointerException
      at sun.awt.image.URLImageSource.getConnection
      (URLImageSource.java:102)
      at sun.awt.image.URLImageSource.getDecoder
      (URLImageSource.java:111)
      at sun.awt.image.InputStreamImageSource.doFetch
      (InputStreamImageSource.java:251)
      at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:217)
      at sun.awt.image.ImageFetcher.run(ImageFetcher.java:185)

      it's a RuntimeException and is thrown by the image fetcher thread (or something
      like that), cause a try/catch arround the 'new ImageIcon(null,"test")' command
      won't help to catch it, it will terminate the running Java application
      (Review ID: 107832)
      ======================================================================

      Name: jl125535 Date: 09/02/2003


      Calling JFrame.setIconImage(Toolkit.getDefaultToolkit().getImage(null)); also produces the exception.
      (Review ID: 186231)
      ======================================================================

            Unassigned Unassigned
            skondamasunw Suresh Kondamareddy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: