JDK-8286708 : Socket and ServerSocket API documentation should link to StandardSocketOptions
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2022-05-13
  • Updated: 2024-04-07
  • Resolved: 2024-04-07
Related Reports
Duplicate :  
Relates :  
Description
The API documentation of Socket and ServerSocket link to SocketOptions which is kind of obsolete. It should link to StandardSocketOptions instead, where appropriate.

See for instance:
https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/net/Socket.html#setSendBufferSize(int)
Comments
I did not notice this current issue when I opened JDK-8329745. I'll go ahead and close this as a duplicate of that other, since a PR is open for that one currently.
07-04-2024

Cleaning up older issues, not currently working on this so un-marking it as "In Progress". Small doc issue, will fix in short order
09-11-2023

Yes, SocketOptions goes with SocketImpl and DatagramSocketImpl so we should reduce the references to it in "user facing" APIs. We added SocketOption/StandardSocketOptions in Java 7 as a more extensible way to support socket options and the existing set/getXXX methods defined by Socket/ServerSocket/DatagramSocket can be specified in terms of the setOption/getOption methods with references to the definitions in StandardSocketOptions.
16-05-2022