Skip to content

8276186: Require getAvailableLocales() methods to include Locale.ROOT #6258

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

Closed
wants to merge 5 commits into from

Conversation

naotoj
Copy link
Member

@naotoj naotoj commented Nov 4, 2021

This fix is to require to include Locale.ROOT in the returned arrays/set from getAvailableLocales() methods in various locale-sensitive classes. The implementation has been including Locale.ROOT since its inception, it is simply a doc clarification (+ a test case verifying it). Corresponding CSR has also been drafted: https://bugs.openjdk.java.net/browse/JDK-8276249


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8276186: Require getAvailableLocales() methods to include Locale.ROOT

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6258/head:pull/6258
$ git checkout pull/6258

Update a local copy of the PR:
$ git checkout pull/6258
$ git pull https://git.openjdk.java.net/jdk pull/6258/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 6258

View PR using the GUI difftool:
$ git pr show -t 6258

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6258.diff

@naotoj
Copy link
Member Author

naotoj commented Nov 4, 2021

/csr

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 4, 2021

👋 Welcome back naoto! 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 openjdk bot added rfr Pull request is ready for review csr Pull request needs approved CSR before integration labels Nov 4, 2021
@openjdk
Copy link

openjdk bot commented Nov 4, 2021

@naotoj this pull request will not be integrated until the CSR request JDK-8276249 for issue JDK-8276186 has been approved.

@openjdk
Copy link

openjdk bot commented Nov 4, 2021

@naotoj The following labels will be automatically applied to this pull request:

  • core-libs
  • i18n

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

@openjdk openjdk bot added core-libs core-libs-dev@openjdk.org i18n i18n-dev@openjdk.org labels Nov 4, 2021
@mlbridge
Copy link

mlbridge bot commented Nov 4, 2021

Webrevs

@openjdk openjdk bot removed the csr Pull request needs approved CSR before integration label Nov 10, 2021
Copy link
Member

@pavelrappo pavelrappo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change to the existing source looks good, and the new test looks beautiful. Thanks for doing this.

@@ -115,7 +115,9 @@
/**
* Lists all the locales that are supported.
* <p>
* The locale 'en_US' will always be present.
* At a minimum, the returned Set must contain a {@code Locale} instance equal to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A nit, really. Consider applying either of these suggestions:

Suggested change
* At a minimum, the returned Set must contain a {@code Locale} instance equal to
* At a minimum, the returned {@code Set} must contain a {@code Locale} instance equal to
Suggested change
* At a minimum, the returned Set must contain a {@code Locale} instance equal to
* At a minimum, the returned set must contain a {@code Locale} instance equal to

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Adopted the former suggestion.

@openjdk
Copy link

openjdk bot commented Nov 10, 2021

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

8276186: Require getAvailableLocales() methods to include Locale.ROOT

Reviewed-by: prappo, smarks, iris

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 109 new commits pushed to the master branch:

  • 67c2714: 8276889: Improve compatibility discussion in instanceKlass.cpp
  • a5c160c: 8267108: Alternate Subject.getSubject and doAs APIs that do not depend on Security Manager APIs
  • ce3ed65: 8273154: Provide a JavadocTester method for non-overlapping, unordered output matching
  • f561d3c: 8276864: Update boot JDKs to 17.0.1 in GHA
  • 38ec3a1: 8276672: Cannot build hsdis on WSL
  • 55b36c6: 8276825: hotspot/runtime/SelectionResolution test errors
  • 0f23c6a: 8276926: Use String.valueOf() when initializing File.separator and File.pathSeparator
  • a0b8445: 8276846: JDK-8273416 is incomplete for UseSSE=1
  • a3f710e: 8276215: Intrinsics matchers should handle native method flags better
  • 0f463a7: 8276845: (fs) java/nio/file/spi/SetDefaultProvider.java fails on x86_32
  • ... and 99 more: https://git.openjdk.java.net/jdk/compare/7115892f96a5a57ce9d37602038b787d19da5d81...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 ready Pull request is ready to be integrated label Nov 10, 2021
Copy link
Member

@stuart-marks stuart-marks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice use of MethodHandles.lookup() in the test.

@naotoj
Copy link
Member Author

naotoj commented Nov 10, 2021

/integrate

@openjdk
Copy link

openjdk bot commented Nov 10, 2021

Going to push as commit 0c409ca.
Since your change was applied there have been 111 commits pushed to the master branch:

  • df02daa: 8269986: Remove +3 from Symbol::identity_hash()
  • 2374abd: 8276678: Malformed Javadoc inline tags in JDK source in com/sun/beans/decoder/DocumentHandler.java
  • 67c2714: 8276889: Improve compatibility discussion in instanceKlass.cpp
  • a5c160c: 8267108: Alternate Subject.getSubject and doAs APIs that do not depend on Security Manager APIs
  • ce3ed65: 8273154: Provide a JavadocTester method for non-overlapping, unordered output matching
  • f561d3c: 8276864: Update boot JDKs to 17.0.1 in GHA
  • 38ec3a1: 8276672: Cannot build hsdis on WSL
  • 55b36c6: 8276825: hotspot/runtime/SelectionResolution test errors
  • 0f23c6a: 8276926: Use String.valueOf() when initializing File.separator and File.pathSeparator
  • a0b8445: 8276846: JDK-8273416 is incomplete for UseSSE=1
  • ... and 101 more: https://git.openjdk.java.net/jdk/compare/7115892f96a5a57ce9d37602038b787d19da5d81...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Nov 10, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Nov 10, 2021
@openjdk
Copy link

openjdk bot commented Nov 10, 2021

@naotoj Pushed as commit 0c409ca.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org i18n i18n-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

4 participants