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
- csr of
-
JDK-8234871 deprecate SocketFlow (SO_FLOW_SLA) and related APIs for removal
- Resolved
- relates to
-
JDK-8245984 Remove terminally deprecated Solaris-specific SO_FLOW_SLA socket option
- Closed