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

ClassCastException in getApplet(name) method when appletviewer started with -Djava.security.manager

    XMLWordPrintable

    Details

    • CPU:
      generic
    • OS:
      generic

      Description

      JDK: 1.5.0, 6.0 - all versions
      test description:
      getAppletContext().getApplet(name) method called in the applet started by AppletViewer by the next command:
      "$JAVA" $JAVA_FLAGS -Djava.security.policy="applet.jp" -cp $CLP sun.applet.AppletViewer getApplet.html

      Exception message:
      java.lang.ClassCastException: java.lang.SecurityManager cannot be cast to sun.applet.AppletSecurity
              at sun.applet.AppletViewer.getApplet(AppletViewer.java:407)
              at AppletB.start(AppletB.java:18)
              at sun.applet.AppletPanel.run(AppletPanel.java:465)
              at java.lang.Thread.run(Thread.java:619)
      The issue affects the following test case from the Security 5.0 test suite:
      headline/typeConfusion

        Attachments

          Activity

            People

            Assignee:
            denis Denis Fokin (Inactive)
            Reporter:
            afomin Alexander Fomin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: