-
Type:
CSR
-
Resolution: Approved
-
Priority:
P4
-
Component/s: core-libs
-
source
-
minimal
-
No change in behavior other than a deprecation removal warning at compile time.
-
Java API
-
SE
Summary
Deprecate the method setPerformancePreferences in java.net.Socket, java.net.SocketImpl, and java.net.ServerSocket for removal without any replacement.
Problem
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, yet it has always been a no-op.
JDK-8366575, which removed the SDP (Sockets Direct Protocol) support, further undermined the value of setPerformancePreferences.
It pollutes the API surface for a non-existent feature, and is annoying to maintain.
Solution
Deprecate setPerformancePreferences for removal.
Specification
src/java.base/share/classes/java/net/ServerSocket.java
@@ -948,6 +948,7 @@ public int getReceiveBufferSize() throws SocketException {
*
* @since 1.5
+ *
+ * @deprecated This method was intended to allow for protocols that are now
+ * obsolete.
*/
+ @Deprecated(since = "26", forRemoval = true)
public void setPerformancePreferences(int connectionTime,
int latency,
int bandwidth)
src/java.base/share/classes/java/net/Socket.java
@@ -1854,6 +1854,7 @@ public static synchronized void setSocketImplFactory(SocketImplFactory fac)
*
* @since 1.5
+ *
+ * @deprecated This method was intended to allow for protocols that are now
+ * obsolete.
*/
+ @Deprecated(since = "26", forRemoval = true)
public void setPerformancePreferences(int connectionTime,
int latency,
int bandwidth)
src/java.base/share/classes/java/net/SocketImpl.java
@@ -358,6 +358,7 @@ void reset() {
*
* @since 1.5
+ *
+ * @deprecated This method was intended to allow for protocols that are now
+ * obsolete.
*/
+ @Deprecated(since = "26", forRemoval = true)
protected void setPerformancePreferences(int connectionTime,
int latency,
int bandwidth)
- csr of
-
JDK-8366577 Deprecate java.net.Socket::setPerformancePreferences
-
- Resolved
-