-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8329825: Clarify the value type for java.net.SocketOptions.SO_LINGER #19243
Conversation
👋 Welcome back jpai! A progress list of the required criteria for merging this PR into |
@jaikiran This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 83 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
* The type of the value returned for this option, by {@link #getOption(int)} or accepted by | ||
* {@link #setOption(int, Object)}, can either be a {@linkplain Boolean#FALSE Boolean.FALSE} | ||
* or an integer value. {@code Boolean.FALSE} represents that this option is disabled whereas | ||
* an integer value represents the linger timeout. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
* Either {@linkplain Boolean#FALSE Boolean.FALSE} or an integer value lesser than {@code 0} | ||
* can be passed to {@link #setOption(int, Object)} to disable this option. An integer | ||
* value {@code >= 0} passed to {@code setOption(int, Object)} will enable the option and | ||
* the value will represent the linger timeout. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
* <p> | ||
* Set the value to {@code Boolean.FALSE} or an integer less than {@code 0} with | ||
* {@link #setOption(int, Object)} to disable this option. An integer greater than or equal to | ||
* {@code 0} will enable the option and will represent the linger timeout. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the referenced description is it "linger interval" rather than "linger timeout" so I think we should use that here too. Otherwise looks okay.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was an oversight. Fixed it now.
/csr |
@AlanBateman has indicated that a compatibility and specification (CSR) request is needed for this pull request. @jaikiran please create a CSR request for issue JDK-8329825 with the correct fix version. This pull request cannot be integrated until the CSR request is approved. |
Thank you Alan for the review. I've opened a CSR https://bugs.openjdk.org/browse/JDK-8332512 for this change. |
Thank you Daniel and Alan for the reviews, both here and on the CSR. I'll go ahead and integrate this now. |
/integrate |
Going to push as commit 5f804b2.
Your commit was automatically rebased without conflicts. |
Can I please get a review of this doc-only change which clarifies the value type for the
java.net.SocketOptions.SO_LINGER
option?Progress
Issues
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19243/head:pull/19243
$ git checkout pull/19243
Update a local copy of the PR:
$ git checkout pull/19243
$ git pull https://git.openjdk.org/jdk.git pull/19243/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 19243
View PR using the GUI difftool:
$ git pr show -t 19243
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19243.diff
Webrev
Link to Webrev Comment