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

Part of java.awt.Desktop.browse(URI) spec is outdated after support of applets was removed

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P3
    • Resolution: Approved
    • Fix Version/s: 11
    • Component/s: client-libs
    • Labels:
      None
    • Subcomponent:
    • Compatibility Risk:
      minimal
    • Interface Kind:
      Java API
    • Scope:
      SE

      Description

      Summary

      After support of applets and webstart was removed the spec and implementation in the java.awt.Desktop.browse(URI) became outdated:

      Problem

      The java.awt.Desktop.browse(URI) does not work as specified.

      Solution

      Drop the code and specification which were added in this fix:

      https://bugs.openjdk.java.net/browse/JDK-6439864

      https://bugs.openjdk.java.net/browse/CCC-6439864

      Specification

      src/java.desktop/share/classes/java/awt/Desktop.java
      
            * defined by the {@code URI} class.
      -     * <p>
      -     * If the calling thread does not have the necessary permissions,
      -     * and this is invoked from within an applet,
      -     * {@code AppletContext.showDocument()} is used. Similarly, if the calling
      -     * does not have the necessary permissions, and this is invoked from within
      -     * a Java Web Started application, {@code BasicService.showDocument()}
      -     * is used.
            *
            * @param uri the URI to be displayed in the user default browser
            * @throws NullPointerException if {@code uri} is {@code null}
      ..............
            * @throws SecurityException if a security manager exists and it
            * denies the
            * {@code AWTPermission("showWindowWithoutWarningBanner")}
            * permission, or the calling thread is not allowed to create a
      -     * subprocess; and not invoked from within an applet or Java Web Started
      -     * application
      -     * @throws IllegalArgumentException if the necessary permissions
      -     * are not available and the URI can not be converted to a {@code URL}
      +     * subprocess
            * @see java.net.URI
            * @see java.awt.AWTPermission
      -     * @see java.applet.AppletContext
            */
           public void browse(URI uri) throws IOException {

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                serb Sergey Bylokhov
                Reporter:
                serb Sergey Bylokhov
                Reviewed By:
                Philip Race
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: