Re: RFR: 8329825: Clarify the value type for java.net.SocketOptions.SO_LINGER [v2]
On Fri, 17 May 2024 08:32:07 GMT, Alan Bateman wrote: >> Jaikiran Pai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> reword the javadoc > > src/java.base/share/classes/java/net/SocketOptions.java line 197: > >> 195: * can be passed to {@link #setOption(int, Object)} to disable this >> option. An integer >> 196: * value {@code >= 0} passed to {@code setOption(int, Object)} will >> enable the option and >> 197: * the value will represent the linger timeout. > > I think the wording could be improved a bit with "Set the value to > Boolean.FALSE or an integer less than 0 with setOption to disable this > option". Done. I've updated the PR with that suggested wording. I decided to let the part which explains that an integer >=0 enables this option stay. I hope that's OK. - PR Review Comment: https://git.openjdk.org/jdk/pull/19243#discussion_r1604568594
Re: RFR: 8329825: Clarify the value type for java.net.SocketOptions.SO_LINGER [v2]
On Fri, 17 May 2024 05:44:29 GMT, Jaikiran Pai wrote: >> Can I please get a review of this doc-only change which clarifies the value >> type for the `java.net.SocketOptions.SO_LINGER` option? > > Jaikiran Pai has updated the pull request incrementally with one additional > commit since the last revision: > > reword the javadoc src/java.base/share/classes/java/net/SocketOptions.java line 197: > 195: * can be passed to {@link #setOption(int, Object)} to disable this > option. An integer > 196: * value {@code >= 0} passed to {@code setOption(int, Object)} will > enable the option and > 197: * the value will represent the linger timeout. I think the wording could be improved a bit with "Set the value to Boolean.FALSE or an integer less than 0 with setOption to disable this option". - PR Review Comment: https://git.openjdk.org/jdk/pull/19243#discussion_r1604554069
Re: RFR: 8329825: Clarify the value type for java.net.SocketOptions.SO_LINGER [v2]
On Wed, 15 May 2024 11:07:05 GMT, Alan Bateman wrote: >> Jaikiran Pai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> reword the javadoc > > src/java.base/share/classes/java/net/SocketOptions.java line 197: > >> 195: * {@link #setOption(int, Object)}, can either be a {@linkplain >> Boolean#FALSE Boolean.FALSE} >> 196: * or an integer value. {@code Boolean.FALSE} represents that this >> option is disabled whereas >> 197: * an integer value represents the linger timeout. > > When the value is an integer then a positive integer enables, a negative > integer disables. I think you'll have to work that into the wording. Hello Alan, I had a look at the code which deals with this option. Based on that I've updated the PR to reword this documentation. Is this accurate now? - PR Review Comment: https://git.openjdk.org/jdk/pull/19243#discussion_r1604376009
Re: RFR: 8329825: Clarify the value type for java.net.SocketOptions.SO_LINGER [v2]
> Can I please get a review of this doc-only change which clarifies the value > type for the `java.net.SocketOptions.SO_LINGER` option? Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision: reword the javadoc - Changes: - all: https://git.openjdk.org/jdk/pull/19243/files - new: https://git.openjdk.org/jdk/pull/19243/files/facb2af8..c9461808 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk=19243=01 - incr: https://webrevs.openjdk.org/?repo=jdk=19243=00-01 Stats: 7 lines in 1 file changed: 3 ins; 0 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/19243.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19243/head:pull/19243 PR: https://git.openjdk.org/jdk/pull/19243