On Sat, 20 Jul 2024 07:51:59 GMT, Jaikiran Pai <[email protected]> wrote:
> Can I please get a review of this change which updates the specification of a
> few methods in `java.net.Socket` and `java.net.ServerSocket` classes to
> specify the `IOException` that the implementation currently already throws?
>
> This is merely a doc update and doesn't change the implementation.
>
> Given that these exceptions can now be asserted, a new jtreg test has been
> introduced to verify the exceptions thrown from these APIs. The test passes.
> tier testing is currently in progress. I'll open a CSR shortly.
src/java.base/share/classes/java/net/ServerSocket.java line 521:
> 519: *
> 520: * @throws IOException if an I/O error occurs when waiting for a
> 521: * connection, or if the socket isn't bound or is
> already closed.
Can you check the existing text as I think it uses "not bound" rather than
"isn't bound".
test/jdk/java/net/Socket/SocketBasicExceptionsTest.java line 40:
> 38: * @run junit SocketBasicExceptionsTest
> 39: */
> 40: public class SocketBasicExceptionsTest {
I would expect these exceptions are already test by existing tests for Socket
and Server, can you check? Only asking because it looks a bit unusual to create
a test for a small subset of the possible exceptions thrown by these classes.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20268#discussion_r1685319926
PR Review Comment: https://git.openjdk.org/jdk/pull/20268#discussion_r1685319724