RFR: 8336815: Several methods in java.net.Socket and ServerSocket do not specify behavior when already bound, connected or closed [v4]
Jaikiran Pai
jpai at openjdk.org
Wed Jul 24 11:03:50 UTC 2024
On Sat, 20 Jul 2024 16:49:09 GMT, Jaikiran Pai <jpai at openjdk.org> 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.
>
> Jaikiran Pai has updated the pull request incrementally with two additional commits since the last revision:
>
> - reduce usage of "if" in the throws clause
> - simplify the test
The CSR has been approved. Joe suggested a tiny change to add a note that many of these methods throw an exception when invoked on a closed socket. I've updated this PR to include that note. No other changes.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20268#issuecomment-2247611767
More information about the net-dev
mailing list