RFR: 8329825: Clarify the value type for java.net.SocketOptions.SO_LINGER

Alan Bateman alanb at openjdk.org
Wed May 15 11:10:02 UTC 2024


On Wed, 15 May 2024 05:06:02 GMT, Jaikiran Pai <jpai at openjdk.org> 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?

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.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19243#discussion_r1601426857


More information about the net-dev mailing list