On Thu, 30 Apr 2026 14:51:30 GMT, Jaikiran Pai <[email protected]> wrote:

>> Can I please get a review of this doc-only change which updates the 
>> specification of `Socket.isInputShutdown()` and `Socket.isOutputShutdown()` 
>> to clarify how it behaves when the `Socket` has been closed?
>> 
>> This addresses https://bugs.openjdk.org/browse/JDK-8310138. The commit in 
>> this PR merely specifies the current implementation. I'll create a CSR 
>> shortly.
>> 
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Jaikiran Pai has updated the pull request with a new target base due to a 
> merge or a rebase. The incremental webrev excludes the unrelated changes 
> brought in by the merge/rebase. The pull request contains four additional 
> commits since the last revision:
> 
>  - merge latest from master branch
>  - link instead of linkplain
>  - improve the text
>  - 8310138 Socket.isInputShutdown and isOutputShutdown don't specify what is 
> returned when socket is closed

src/java.base/share/classes/java/net/Socket.java line 1756:

> 1754:      * independent of each other. Irrespective of whether or not the 
> socket
> 1755:      * is {@linkplain #close() closed}, this method will return {@code 
> true} only
> 1756:      * if a prior call to {@link #shutdownInput()} completed 
> successfully.

It might be simpler to have one sentence to say that this method will return 
true for a closed socket if was shutdown for input before  the socket was 
closed. That would avoid mentioning "write-half" and closed state.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/31000#discussion_r3189954044

Reply via email to