RFR: 8366577: Deprecate java.net.Socket::setPerformancePreferences

Alan Bateman alanb at openjdk.org
Tue Nov 4 13:58:46 UTC 2025


On Tue, 4 Nov 2025 10:53:44 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:

> `java.net.Socket::setPerformancePreferences` was introduced in Java 1.5 with the intention of providing a declarative API for configuring the performance-wise characteristics of the underlying socket. It has always been a no-op and a corpus search does not reveal any significant usages of it. Recently merged [JDK-8366575] removes the SDP (Sockets Direct Protocol) support, and this further undermines the value of `setPerformancePreferences`. This PR deprecates `setPerformancePreferences` and friends _for removal_.
> 
> [JDK-8366575]: https://bugs.openjdk.org/browse/JDK-8366575

src/java.base/share/classes/java/net/ServerSocket.java line 951:

> 949:      * @since 1.5
> 950:      */
> 951:     @Deprecated(since = "26", forRemoval = true)

Are you planning to add a `@deprecated` comment to these methods?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/28129#discussion_r2490619726


More information about the net-dev mailing list