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

Mark deprecated netscape.javascript.JSObject::getWindow API forRemoval=true

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P3 P3
    • 12
    • deploy
    • None
    • source
    • minimal
    • Applications that reference this deprecated method will now get a warning even if they have suppressed deprecation warnings. This may cause a build failure if they also enable the option to treat warnings as errors.
    • Java API
    • JDK

      Summary

      Mark the deprecated netscape.javascript.JSObject::getWindow method with "forRemoval=true".

      Problem

      The JSObject::getWindow method has been deprecated since JDK 9. With the removal of Java Plugin, there is no longer a useful way to use this method. We would like to remove it in a future release to remove the dependency from the jdk.jsobject module on the java.desktop module.

      Solution

      Add "forRemoval=true" to the existing @Deprecated annotation of netscape.javascript.JSObject::getWindow.

      Specification

      --- a/src/jdk.jsobject/share/classes/netscape/javascript/JSObject.java
      +++ b/src/jdk.jsobject/share/classes/netscape/javascript/JSObject.java
      @@ -150,12 +150,12 @@
            * @throws JSException when an error is reported from the browser or
            * JavaScript engine or if applet is {@code null}
            *
      -     * @deprecated  The Applet API is deprecated. See the
      +     * @deprecated The Applet API is deprecated, no replacement. See the
            * <a href="{@docRoot}/java.desktop/java/applet/package-summary.html">
            * java.applet package documentation</a> for further information.
            */
      
      -    @Deprecated(since = "9")
      +    @Deprecated(since="9", forRemoval=true)
           @SuppressWarnings("exports")
           public static JSObject getWindow(Applet applet) throws JSException {
               return ProviderLoader.callGetWindow(applet);

            kcr Kevin Rushforth
            kcr Kevin Rushforth
            Philip Race
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: