RFR: 8301569: list mode of jmod and jimage cannot be used normally in turkish locale

Alan Bateman alanb at openjdk.org
Thu Feb 2 07:41:23 UTC 2023


On Wed, 1 Feb 2023 09:26:17 GMT, Glavo <duke at openjdk.org> wrote:

>> 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.
>
>> The equivalent in jlink and jimage are using Locale.ENGLISH, I guess we should try to keep them consistent.
> 
> This class is using `Locale.ROOT` to convert modifiers to lowercase, and there is no reference to `Locale.ENGLISH`.

My comment was about these cases:

src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java:                        String name = entry.name().toUpperCase(Locale.ENGLISH);
src/jdk.jlink/share/classes/jdk/tools/jimage/JImageTask.java:                options.task = Enum.valueOf(Task.class, args[0].toUpperCase(Locale.ENGLISH));

-------------

PR: https://git.openjdk.org/jdk/pull/12281


More information about the core-libs-dev mailing list