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

ServerSocket.implAccept should include warnings about Socket type/state

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 13
    • Fix Version/s: 13
    • Component/s: core-libs
    • Subcomponent:
    • Resolved In Build:
      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

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

                  Dates

                  Created:
                  Updated:
                  Resolved: