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

Socket(Proxy) should warn about binding and socket options set prior to connecting

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: In Progress
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:

      Description

      The Socket(Proxy) constructor can be used to create a Socket that uses a SOCKS or HTTP proxy. The constructor creates an unconnected socket so it's possible to bind the socket to a local address/port or set socket options prior to connecting the socket. Binding or setting socket options prior to connect is a hazard as the underlying SocketImpl is replaced once the connection is established to the SOCKS or HTTP proxy. Minimally the javadoc for this constructor should include a warning or API note to make it clear that the local address or socket options may be lost when the connection is established to the proxy.

        Attachments

          Activity

            People

            Assignee:
            michaelm Michael McMahon
            Reporter:
            alanb Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: