On Wed, 6 May 2026 13:40:07 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 six additional > commits since the last revision: > > - Reword the shutdownInput/Output and isInput/OutputShutdown() methods > - merge latest from master branch > - 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 1637: > 1635: * Places the input stream for this socket at "end of stream". > 1636: * Any data sent to the input stream side of the socket is > acknowledged > 1637: * and then silently discarded. I decided to remove this "Any data sent ..." sentence because in the implementation of `NioSocketImpl`, I do not see any code which discards these bytes if the input was shutdown after they have been read from the socket. Let me know if I misunderstood this part and if this sentence needs to be reinstated or reworded. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/31000#discussion_r3195877223
