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

Incorrect security exceptions are raised

XMLWordPrintable

    • 2d
    • 1.3
    • generic, sparc
    • generic, solaris_2.5



      Name: inC81039 Date: 12/15/98



      In HotJava 2.0 during page reloading lots of following exceptions are raised:

      Uncaught error fetching image:
      java.lang.SecurityException: image moved!
              at sun.awt.image.URLImageSource.getDecoder(URLImageSource.java:110)
              at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:259)
              at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:151)
              at sun.awt.image.ImageFetcher.run(ImageFetcher.java:127)

      The reason for this bug is in sun.awt.image.URLImageSource.getDecoder()
      Comparison done on url's host is based on object identity.
      Because of this even if same port and same host are used SecurityException is thrown.

      It is impossible to catch this exception outside AWT because it is thrown in internal
      AWT thread.
      Although image is actually reloaded lots of misleading output is very distractive.

      Suggested fix is to use string's comparison instead of comparison of object references.

      ======================================================================

            jehung Jeannette Hung
            igor Igor Nekrestyanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: