Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8225480

Document that the no-args Socket constructor uses the client socket implementation factory

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P3
    • Resolution: Approved
    • Fix Version/s: 13
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Compatibility Risk:
      minimal
    • Interface Kind:
      Java API
    • Scope:
      SE

      Description

      Summary

      Specify that the no-args Socket constructor invokes the client socket implementation factory, if one has been set, which is existing and long standing behavior.

      Problem

      The no-args Socket constructor omits the fact that it uses the client socket implementation factory, if one has been set.

      Solution

      Update the specification of the no-args Socket constructor to specify that it uses the client socket implementation factory, if one has been set.

      Specification

      src/java.base/share/classes/java/net/Socket.java

        /**
      -  * Creates an unconnected socket, with the
      -  * system-default type of SocketImpl.
      +  * Creates an unconnected Socket.
      +  *
      +  * If the application has specified a client socket implementation
      +  * factory, that factory's {@code createSocketImpl} method is called to
      +  * create the actual socket implementation. Otherwise a system-default
      +  * socket implementation is created.
         *
         * @since   1.1
         * @revised 1.4
         */
        public Socket()

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                chegar Chris Hegarty
                Reporter:
                chegar Chris Hegarty
                Reviewed By:
                Alan Bateman
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: