RFR: 8301569: list mode of jmod and jimage cannot be used normally in turkish locale
Alan Bateman
alanb at openjdk.org
Wed Feb 1 07:22:52 UTC 2023
On Sun, 29 Jan 2023 15:37:28 GMT, Glavo <duke at openjdk.org> wrote:
> 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.
src/jdk.jlink/share/classes/jdk/tools/jimage/JImageTask.java line 214:
> 212: try {
> 213: log.println(TASK_HELPER.getMessage("main.usage." +
> 214: options.task.toString().toLowerCase(Locale.ROOT)));
This is the lookup of the main.usage.list resource (`jimage list --help`) rather than the `list` option but good to fix this anyway.
src/jdk.jlink/share/classes/jdk/tools/jmod/JmodTask.java line 1474:
> 1472: String verb = words.get(0);
> 1473: try {
> 1474: options.mode = Enum.valueOf(Mode.class, verb.toUpperCase(Locale.ROOT));
The equivalent in jlink and jimage are using Locale.ENGLISH, I guess we should try to keep them consistent.
-------------
PR: https://git.openjdk.org/jdk/pull/12281
More information about the core-libs-dev
mailing list