On Tue, 5 May 2026 16:15:37 GMT, Alan Bateman <[email protected]> wrote:
>> 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.
The initial change in this PR was a one sentence description of this method:
>
> {@linkplain #close() Closing} a socket doesn't clear its read-half shutdown
> state,
> which means this method will return {@code true}
> for a closed socket if {@linkplain #shutdownInput() shutdownInput()}
> completed successfully prior to the socket being closed.
We decided to make it a bit more verbose to clarify what it really means
https://github.com/openjdk/jdk/pull/31000#discussion_r3168263753. I would need
some help with the specific text if this needs to be trimmed down. Would you
have something that we could use here?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/31000#discussion_r3190038400