JDK-8235139 : Deprecate the socket impl factory mechanism
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 14
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-11-29
  • Updated: 2021-02-18
  • Resolved: 2021-02-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17
17 b10Fixed
Related Reports
Blocks :  
CSR :  
Relates :  
Relates :  
Sub Tasks
JDK-8235140 :  
JDK-8260547 :  
JDK-8261521 :  
Description
This issue proposes to deprecate, and eventually remove, the API points
for statically configuring a system-wide factory for the socket types in
the java.net package. Specifically, the following:

 * Methods:
  1) static void ServerSocket.setSocketFactory���(SocketImplFactory fac)
  2) static void Socket.setSocketImplFactory���(SocketImplFactory fac)
  3) static void DatagramSocket.setDatagramSocketImplFactory���(DatagramSocketImplFactory fac)

 * Types
  a) java.net SocketImplFactory
  b) java.net DatagramSocketImplFactory

The java.net SocketImplFactory and DatagramSocketImplFactory types can
be deprecated too, since their only use relates to the above factory
setter methods.

The CSR for JDK-8220494 contains some verbiage about the potential
issues that setting factories can have, and alludes to their possible
future removal.
Comments
Changeset: 16623734 Author: Patrick Concannon <pconcannon@openjdk.org> Date: 2021-02-11 10:00:31 +0000 URL: https://git.openjdk.java.net/jdk/commit/16623734
11-02-2021

Before this issue can proceed, JDK-8237352 should be evaluated to ensure that a custom DatagramSocket, and MulticastSocket, implementation can be created ( without resulting in the internal implementation creating ("leaking") a UDP socket )
16-01-2020