Skip to content
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

Closed
wants to merge 4 commits into from

Conversation

jaikiran
Copy link
Member

@jaikiran jaikiran commented May 15, 2024

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

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change requires CSR request JDK-8332512 to be approved
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issues

  • JDK-8329825: Clarify the value type for java.net.SocketOptions.SO_LINGER (Enhancement - P4)
  • JDK-8332512: Clarify the value type for java.net.SocketOptions.SO_LINGER (CSR)

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

Sorry, something went wrong.

@bridgekeeper
Copy link

bridgekeeper bot commented May 15, 2024

👋 Welcome back jpai! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented May 15, 2024

@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:

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

Reviewed-by: alanb, dfuchs

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 master branch:

  • 52eda79: 8332538: Switch off JIT memory limit check for TestAlignVectorFuzzer.java
  • d999b81: 8331572: Allow using OopMapCache outside of STW GC phases
  • 8291c94: 8331224: ClassCastException in ObjectInputStream hides ClassNotFoundException
  • 42e3c84: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory
  • 5cf8288: 8332153: RISC-V: enable tests and add comment for vector shift instruct (shared by vectorization and Vector API)
  • ae9ad86: 8331934: [s390x] Add support for primitive array C1 clone intrinsic
  • 3479b46: 8332595: Serial: Remove unused TenuredGeneration::should_collect
  • 9bfae88: 8332297: annotation processor that generates records sometimes fails due to NPE in javac
  • 4e169d1: 8332401: G1: TestFromCardCacheIndex.java with -XX:GCCardSizeInBytes=128 triggers underflow assertion
  • 7ffc999: 8332498: [aarch64, x86] improving OpToAssembly output for partialSubtypeCheckConstSuper Instruct
  • ... and 73 more: https://git.openjdk.org/jdk/compare/5a4415a6bddb25cbd5b87ff8ad1a06179c2e452e...master

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 master branch, type /integrate in a new comment.

@openjdk openjdk bot added the rfr Pull request is ready for review label May 15, 2024
@openjdk
Copy link

openjdk bot commented May 15, 2024

@jaikiran The following label will be automatically applied to this pull request:

  • net

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the net net-dev@openjdk.org label May 15, 2024
@mlbridge
Copy link

mlbridge bot commented May 15, 2024

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.
Copy link
Contributor

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.

Copy link
Member Author

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.
Copy link
Contributor

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".

Copy link
Member Author

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.
Copy link
Contributor

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.

Copy link
Member Author

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.

@AlanBateman
Copy link
Contributor

/csr

@openjdk openjdk bot added ready Pull request is ready to be integrated csr Pull request needs approved CSR before integration labels May 20, 2024
@openjdk
Copy link

openjdk bot commented May 20, 2024

@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.

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label May 20, 2024
@jaikiran
Copy link
Member Author

Thank you Alan for the review. I've opened a CSR https://bugs.openjdk.org/browse/JDK-8332512 for this change.

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed csr Pull request needs approved CSR before integration labels May 21, 2024
@jaikiran
Copy link
Member Author

Thank you Daniel and Alan for the reviews, both here and on the CSR. I'll go ahead and integrate this now.

@jaikiran
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented May 22, 2024

Going to push as commit 5f804b2.
Since your change was applied there have been 83 commits pushed to the master branch:

  • 52eda79: 8332538: Switch off JIT memory limit check for TestAlignVectorFuzzer.java
  • d999b81: 8331572: Allow using OopMapCache outside of STW GC phases
  • 8291c94: 8331224: ClassCastException in ObjectInputStream hides ClassNotFoundException
  • 42e3c84: 8332086: Remove the usage of ServiceLoader in j.u.r.RandomGeneratorFactory
  • 5cf8288: 8332153: RISC-V: enable tests and add comment for vector shift instruct (shared by vectorization and Vector API)
  • ae9ad86: 8331934: [s390x] Add support for primitive array C1 clone intrinsic
  • 3479b46: 8332595: Serial: Remove unused TenuredGeneration::should_collect
  • 9bfae88: 8332297: annotation processor that generates records sometimes fails due to NPE in javac
  • 4e169d1: 8332401: G1: TestFromCardCacheIndex.java with -XX:GCCardSizeInBytes=128 triggers underflow assertion
  • 7ffc999: 8332498: [aarch64, x86] improving OpToAssembly output for partialSubtypeCheckConstSuper Instruct
  • ... and 73 more: https://git.openjdk.org/jdk/compare/5a4415a6bddb25cbd5b87ff8ad1a06179c2e452e...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label May 22, 2024
@openjdk openjdk bot closed this May 22, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels May 22, 2024
@openjdk
Copy link

openjdk bot commented May 22, 2024

@jaikiran Pushed as commit 5f804b2.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@jaikiran jaikiran deleted the 8329825 branch November 8, 2024 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated net net-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

None yet

3 participants