JDK-8214832 : Mark deprecated netscape.javascript.JSObject::getWindow API forRemoval=true
  • Type: CSR
  • Component: deploy
  • Priority: P3
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 12
  • Submitted: 2018-12-05
  • Updated: 2018-12-06
  • Resolved: 2018-12-06
Related Reports
CSR :  
Description
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);

Comments
Moving to Approved.
06-12-2018