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

ServerSocket.implAccept should include warnings about Socket type/state

    XMLWordPrintable

Details

    • b25

    Backports

      Description

        ServerSocket.implAccept can be called with a Socket that has an underlying SocketImpl. The Socket may be connected, closed, it may even be a Socket with a SocketImpl that ServerSocket doesn't know anything about.

        Minimally we should put a warning into the implAccept method that it only should be called with a newly created/unbound Socket. The warning can make it clear that calling it with a Socket that has SocketImpl may lead to unspecified behavior, maybe even resource leakage.

        Attachments

          Issue Links

            Activity

              People

                chegar Chris Hegarty
                alanb Alan Bateman
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: