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

Demo (Animator) compiled with jdk1.1p -> ClassCastException thrown

XMLWordPrintable

    • generic
    • generic

      The Animator demo in the jdk1.1p was compiled with jdk1.1p, and each of
      example1, example2, example3, and example4 was loaded into appletviewer
      and run. When 'Restart' was selected from the Applet menu in appletviewer,
      a ClassCastException was thrown and the applet was not restarted:

      // Windows

      Exception occurred during event handling:
      java.lang.ClassCastException:
              at Animator.paint(Animator.java:978)
              at java.awt.Component.dispatchEvent(Component.java:1175)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:109)
      Exception occurred during event handling:
      java.lang.ClassCastException:
              at Animator.paint(Animator.java:978)
              at Animator.update(Animator.java:943)
              at java.awt.Component.dispatchEvent(Component.java:1178)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:109)
      java.lang.ClassCastException:
              at Animator.run(Animator.java:912)
              at java.lang.Thread.run(Thread.java:336)
      //
      // After selecting 'Reload' the following exception was thrown, but
      // the applet was reloaded:

      Exception occurred during event handling:
      java.lang.NullPointerException: invalid peer
                    at java.awt.Component.dispatchEvent(Component.java:1242)
                    at java.awt.EventDispatchThread.run(EventDispatchTrhead.java:109)
      //
      // NOTE: These exceptions were NOT thrown when 'Restart' was selected
      // while running other demos (e.g., ArcTest -- the applet restarted)>
      //

      // Solaris --

      java.lang.ClassCastException: java.net.URL
      at Animator.run(Animator.java:856)
      at java.lang.Thread.run(Thread.java)
      Exception occurred during event handling:
      java.lang.ClassCastException: java.net.URL
      at Animator.paint(Animator.java:918)
      at java.awt.Component.dispatchEvent(Component.java)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java)

      This problem is still happening in JDK11Beta3.2

            mmcclosksunw Michael Mccloskey (Inactive)
            lminersunw Linda Miner (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: