The Socket Implementation Factory Mechanism has been deprecated

The following static methods used to set the system-wide socket implementation factories have been deprecated:
static void ServerSocket.setSocketFactory​(SocketImplFactory fac)
static void Socket.setSocketImplFactory​(SocketImplFactory fac)
static void DatagramSocket.setDatagramSocketImplFactory​(DatagramSocketImplFactory fac)

For more information on the deprecation of this package, see Deprecate the socket implementation factory mechanism.