Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8220493 Prepare Socket/ServerSocket for alternative platform SocketImpl
  3. JDK-8225154

Release Note: Change to ServerSocket.accept() When the System-Wide Factory for Client or Server Socket Implementations Is Set


    • Type: Sub-task
    • Status: Closed
    • Priority: P4
    • Resolution: Delivered
    • Affects Version/s: 13
    • Fix Version/s: 13
    • Component/s: core-libs
    • Subcomponent:
    • Verification:


      Developers using the `java.net.Socket.setSocketImplFactory` or `java.net.ServerSocket.setSocketFactory` APIs to change the system-wide factories for client socket or server socket implementations should note the following changes:

      1. Invoking `ServerSocket::accept` on a `ServerSocket` using a system-default `SocketImpl` to accept a connection will always return a `Socket` with a system-default `SocketImpl`. In this case, the system-wide factory for client socket implementations will not be invoked to create the client socket implementation.

      2. `java.net.ServerSocket::implAccept` has been changed to disallow a `ServerSocket` using a system-default `SocketImpl` from accepting a connection with a `Socket` using a custom `SocketImpl`. It has also been changed to disallow a `ServerSocket` using a custom `SocketImpl` to accept a connection with a `Socket` using a system-default `SocketImpl`. Disallowing these nonsensical combinations of `SocketImpl` improves reliability in cases where an application sets one, but not both, socket implementation factories.

      The changes should have no impact on applications that set the same factory for both client and server socket implementations.




            • Assignee:
              alanb Alan Bateman
              alanb Alan Bateman
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: