Skip to content

8301569: jmod list option and jimage list --help not interpreted correctly on turkish locale #12281

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 4 commits into from

Conversation

Glavo
Copy link
Contributor

@Glavo Glavo commented Jan 29, 2023

When the default Locale is tr, the jmod and jimage commands have the following problems:

  • The jmod command does not correctly recognize the list mode typed in lowercase;
  • The jimage command cannot obtain the help information of the list mode.

Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8301569: jmod list option and jimage list --help not interpreted correctly on turkish locale (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/12281/head:pull/12281
$ git checkout pull/12281

Update a local copy of the PR:
$ git checkout pull/12281
$ git pull https://git.openjdk.org/jdk.git pull/12281/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 12281

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/12281.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 29, 2023

👋 Welcome back Glavo! 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 Jan 29, 2023

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

  • core-libs

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 core-libs core-libs-dev@openjdk.org label Jan 29, 2023
@Glavo
Copy link
Contributor Author

Glavo commented Jan 29, 2023

There are some similar hidden dangers in OpenJDK. I hope to clean them up.

These hidden dangers are scattered in many modules. Should I solve them in multiple PRs?

@Glavo Glavo changed the title list mode of jmod and jimage cannot be used normally in turkish locale 8301569: list mode of jmod and jimage cannot be used normally in turkish locale Feb 1, 2023
@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 1, 2023
@mlbridge
Copy link

mlbridge bot commented Feb 1, 2023

Webrevs

@@ -211,7 +211,7 @@ int run(String[] args) {
} else {
try {
log.println(TASK_HELPER.getMessage("main.usage." +
options.task.toString().toLowerCase()));
options.task.toString().toLowerCase(Locale.ROOT)));
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the lookup of the main.usage.list resource (jimage list --help) rather than the list option but good to fix this anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the lookup of the main.usage.list resource (jimage list --help) rather than the list option but good to fix this anyway.

Sorry, I found the problem with text search, but didn't look at them carefully.

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 2, 2023

@Glavo This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 30, 2023

@Glavo This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open pull request command.

@bridgekeeper bridgekeeper bot closed this Mar 30, 2023
@Glavo
Copy link
Contributor Author

Glavo commented Mar 30, 2023

/open

@openjdk openjdk bot reopened this Mar 30, 2023
@openjdk
Copy link

openjdk bot commented Mar 30, 2023

@Glavo This pull request is now open

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 27, 2023

@Glavo This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@jaikiran
Copy link
Member

jaikiran commented May 4, 2023

Hello @Glavo, I see you reopened this PR, so I'm guessing you are still interested in pursuing this further. Are you considering updating this PR to implement Alan's suggestion to do similar changes in JImageTask.java and JlinkTask.java to use Locale.ROOT or update this proposed change to use Locale.ENGLISH?

@mlchung
Copy link
Member

mlchung commented May 31, 2023

jdk.jlink uses Locale.ROOT in most calls. I suggest to change the existing references of Locale.ENGLISH to use Locale.ROOT (one in JImageTask and one in JlinkTask). Should consider also change VersionPropsPlugin although not strictly necessary.

@Glavo
Copy link
Contributor Author

Glavo commented May 31, 2023

Hello @Glavo, I see you reopened this PR, so I'm guessing you are still interested in pursuing this further. Are you considering updating this PR to implement Alan's suggestion to do similar changes in JImageTask.java and JlinkTask.java to use Locale.ROOT or update this proposed change to use Locale.ENGLISH?

@jaikiran Hi Jaikiran, as my previous reply, I do not agree that Locale.ENGLISH should be used here, I think Locale.ROOT is more reasonable.

@jaikiran
Copy link
Member

jaikiran commented Jun 7, 2023

Hello @Glavo, I see you reopened this PR, so I'm guessing you are still interested in pursuing this further. Are you considering updating this PR to implement Alan's suggestion to do similar changes in JImageTask.java and JlinkTask.java to use Locale.ROOT or update this proposed change to use Locale.ENGLISH?

@jaikiran Hi Jaikiran, as my previous reply, I do not agree that Locale.ENGLISH should be used here, I think Locale.ROOT is more reasonable.

Sounds fine to me and as other have agreed Locale.ROOT would be more appropriate. Would you be willing to update this PR to update the few other occurences in some classes (JImageTask, JlinkTask and VersionPropsPlugin) as noted by Mandy and Alan in their comments?

@AlanBateman
Copy link
Contributor

Did you check the use of toUpperCase(Locale.ENGLISH) in JlinkTask.java and JImageTask.java to see if they are correct.

@Glavo
Copy link
Contributor Author

Glavo commented Jun 27, 2023

Sounds fine to me and as other have agreed Locale.ROOT would be more appropriate. Would you be willing to update this PR to update the few other occurences in some classes (JImageTask, JlinkTask and VersionPropsPlugin) as noted by Mandy and Alan in their comments?

I think in most cases, there is no difference in the effect between toUpperCase(Locale.ROOT) and toUpperCase(Locale.ENGLISH).

If you think it is appropriate to replace Locale.ENGLISH with Locale.ROOT in this PR, I can do so. I believe that compared to Locale.ENGLISH, the `Locale.ROOT is more suitable for use in more places.

@Glavo
Copy link
Contributor Author

Glavo commented Jun 27, 2023

I have updated JImageTask, JlinkTask, and VersionPropsPlugin.

Copy link
Member

@mlchung mlchung left a comment

Choose a reason for hiding this comment

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

LGTM

@Glavo Glavo changed the title 8301569: list mode of jmod and jimage cannot be used normally in turkish locale 8301569: jmod list option and jimage list --help not interpreted correctly on turkish locale Jun 27, 2023
@openjdk
Copy link

openjdk bot commented Jun 27, 2023

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

8301569: jmod list option and jimage list --help not interpreted correctly on turkish locale

Reviewed-by: mchung, naoto, jpai

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

  • 8f5a384: 8311032: Empty value for java.protocol.handler.pkgs system property can lead to unnecessary classloading attempts of protocol handlers
  • ded1370: 8309811: BytecodePrinter cannot handle unlinked classes
  • 02b17d7: 8310264: In PhaseChaitin::Split defs and phis are leaked
  • a63afa4: 8294427: Check boxes and radio buttons have rendering issues on Windows in High DPI env
  • 3df36c4: 8310061: Note if implicit annotation processing is being used
  • da0f832: 8310606: Fix signed integer overflow, part 3
  • f0c2f09: 8296972: [macos13] java/awt/Frame/MaximizedToIconified/MaximizedToIconified.java: getExtendedState() != 6 as expected.
  • 9f46fc2: 8310906: Fix -Wconversion warnings in runtime, oops and some code header files.
  • 7fffdb5: 8310405: Linker.Option.firstVariadicArg should specify which index values are valid
  • b6c789f: 8309140: ResourceHashtable failed "assert(~(_allocation_t[0] | allocation_mask) == (uintptr_t)this) failed: lost resource object"
  • ... and 30 more: https://git.openjdk.org/jdk/compare/73d7aa1d2cb037fed69263a1990258866333664d...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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@mlchung, @naotoj, @jaikiran) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jun 27, 2023
@Glavo
Copy link
Contributor Author

Glavo commented Jun 27, 2023

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Jun 27, 2023
@openjdk
Copy link

openjdk bot commented Jun 27, 2023

@Glavo
Your change (at version 3eb4407) is now ready to be sponsored by a Committer.

@jaikiran
Copy link
Member

Thank you Glavo for these changes. The latest changes look good to me. I see that others more familiar with this code have approved the current state of the PR. I'll run some internal tests just to make sure nothing unexpectedly breaks, before sponsoring this today.

@jaikiran
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Jun 29, 2023

Going to push as commit 6f58ab2.
Since your change was applied there have been 40 commits pushed to the master branch:

  • 8f5a384: 8311032: Empty value for java.protocol.handler.pkgs system property can lead to unnecessary classloading attempts of protocol handlers
  • ded1370: 8309811: BytecodePrinter cannot handle unlinked classes
  • 02b17d7: 8310264: In PhaseChaitin::Split defs and phis are leaked
  • a63afa4: 8294427: Check boxes and radio buttons have rendering issues on Windows in High DPI env
  • 3df36c4: 8310061: Note if implicit annotation processing is being used
  • da0f832: 8310606: Fix signed integer overflow, part 3
  • f0c2f09: 8296972: [macos13] java/awt/Frame/MaximizedToIconified/MaximizedToIconified.java: getExtendedState() != 6 as expected.
  • 9f46fc2: 8310906: Fix -Wconversion warnings in runtime, oops and some code header files.
  • 7fffdb5: 8310405: Linker.Option.firstVariadicArg should specify which index values are valid
  • b6c789f: 8309140: ResourceHashtable failed "assert(~(_allocation_t[0] | allocation_mask) == (uintptr_t)this) failed: lost resource object"
  • ... and 30 more: https://git.openjdk.org/jdk/compare/73d7aa1d2cb037fed69263a1990258866333664d...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jun 29, 2023
@openjdk openjdk bot closed this Jun 29, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Jun 29, 2023
@openjdk
Copy link

openjdk bot commented Jun 29, 2023

@jaikiran @Glavo Pushed as commit 6f58ab2.

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

@Glavo Glavo deleted the tr-locale branch July 3, 2023 19:37
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 integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

5 participants