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

deprecate SocketFlow (SO_FLOW_SLA) and related APIs for removal

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P3
    • Resolution: Approved
    • Fix Version/s: 14
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Compatibility Kind:
      source
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      Not relevant due to deprecation of Solaris port itself
    • Interface Kind:
      Java API
    • Scope:
      JDK

      Description

      Summary

      Deprecate a Solaris-only socket option arising from the deprecation of the Solaris port of Java.

      Problem

      If the Solaris version of Java is no longer supported, then any features that are only available on Solaris should be deprecated.

      Solution

      Deprecate the SocketFlow type for removal and the SO_FLOW_SLA socket option in jdk.net

      Specification

      diff -r 73da8751c395 src/jdk.net/share/classes/jdk/net/ExtendedSocketOptions.java
      --- a/src/jdk.net/share/classes/jdk/net/ExtendedSocketOptions.java      Mon Dec 02 09:45:32 2019 -0500
      +++ b/src/jdk.net/share/classes/jdk/net/ExtendedSocketOptions.java      Mon Dec 02 17:18:46 2019 +0000
      @@ -64,7 +64,11 @@
            * setting or getting this option requires a {@link NetworkPermission}
            * {@code ("setOption.SO_FLOW_SLA")} or {@code "getOption.SO_FLOW_SLA"}
            * respectively.
      +     * @deprecated This is supported only on Solaris. Due to deprecation
      +     * of Solaris port, this option is also deprecated.
            */
      +    @Deprecated(since="14", forRemoval=true)
      +    @SuppressWarnings("removal")
           public static final SocketOption<SocketFlow> SO_FLOW_SLA = new
               ExtSocketOption<SocketFlow>("SO_FLOW_SLA", SocketFlow.class);
      
      diff -r 73da8751c395 src/jdk.net/share/classes/jdk/net/NetworkPermission.java
      --- a/src/jdk.net/share/classes/jdk/net/NetworkPermission.java  Mon Dec 02 09:45:32 2019 -0500
      +++ b/src/jdk.net/share/classes/jdk/net/NetworkPermission.java  Mon Dec 02 17:18:46 2019 +0000
      @@ -49,14 +49,15 @@
        *   <td>set the {@link ExtendedSocketOptions#SO_FLOW_SLA SO_FLOW_SLA} option
        *       on any socket that supports it</td>
        *   <td>allows caller to set a higher priority or bandwidth allocation
      - *       to sockets it creates, than they might otherwise be allowed.</td>
      + *       to sockets it creates, than they might otherwise be allowed.
      + *       This permission is deprecated.</td>
        * </tr>
        * <tr>
        *   <th scope="row">getOption.SO_FLOW_SLA</th>
        *   <td>retrieve the {@link ExtendedSocketOptions#SO_FLOW_SLA SO_FLOW_SLA}
        *       setting from any socket that supports the option</td>
        *   <td>allows caller access to SLA information that it might not
      - *       otherwise have</td>
      + *       otherwise have. This permission is deprecated.</td>
        * </tr>
        * </tbody>
        * </table>
      diff -r 73da8751c395 src/jdk.net/share/classes/jdk/net/SocketFlow.java
      --- a/src/jdk.net/share/classes/jdk/net/SocketFlow.java Mon Dec 02 09:45:32 2019 -0500
      +++ b/src/jdk.net/share/classes/jdk/net/SocketFlow.java Mon Dec 02 17:18:46 2019 +0000
      @@ -43,8 +43,12 @@
        * When a security manager is installed, a {@link NetworkPermission}
        * is required to set or get this option.
        *
      + * @deprecated This is supported only on Solaris. Due to deprecation
      + * of Solaris port, this feature is also deprecated.
      + *
        * @since 1.8
        */
      +@Deprecated(since="14", forRemoval=true)
       public class SocketFlow {
      
           @Native public static final int UNSET = -1;
      @@ -65,9 +69,13 @@
            * socket option. Both setting and getting the option return
            * one of these statuses, which reflect the state of socket's
            * flow.
      +     * @deprecated This is supported only on Solaris. Due to 
      +     * deprecation of Solaris port, this enum is also deprecated.
            *
            * @since 1.8
            */
      +    @SuppressWarnings("removal")
      +    @Deprecated(since="14", forRemoval=true)
           public enum Status {
               /**
                * Set or get socket option has not been called yet. Status

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                michaelm Michael McMahon
                Reporter:
                smarks Stuart Marks
                Reviewed By:
                Alan Bateman
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: