-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8355522: Remove the java.locale.useOldISOCodes
system property
#26419
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
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back naoto! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
Webrevs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also remove the test method, ModuleTestUtil.runModuleWithLegacyCode
which passes the now defunct property to the process.
} | ||
|
||
static class Runner { | ||
private static final String obsoleteCode = "iw"; | ||
private static final String newCode = "he"; | ||
|
||
public static void main(String[] args) { | ||
// Ensure java.locale.useOldISOCodes is only interpreted at runtime startup | ||
// Should have no effect | ||
// Ensure java.locale.useOldISOCodes should have no effect | ||
System.setProperty("java.locale.useOldISOCodes", "false"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, it seems weird to keep this line in the test, even if it has no effect. The original goal was to ensure the property only had impact when set during startup. The current test is no longer concerned with that (since the property no longer performs any mapping).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. I re-purposed the test but as you mentioned, the line is confusing. Removed.
I thought about that, but decided to leave it as it is, just to make sure everything works as before. For the same reason, I did not remove the |
@@ -183,9 +180,9 @@ public static BaseLocale getInstance(String language, String script, | |||
|
|||
public static String convertOldISOCodes(String language) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was there before this change, but above on line 166 I think we should update the outdated comment,
// JDK uses deprecated ISO639.1 language codes for he, yi and id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -534,28 +534,9 @@ | |||
* {@code in}. Since Java SE 17, this is no longer the case. Each |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* <p>Locale's constructors have always converted three language codes to
* their earlier, obsoleted forms: {@code he} maps to {@code iw},
* {@code yi} maps to {@code ji}, and {@code id} maps to
* {@code in}. Since Java SE 17, this is no longer the case.
This history was relevant when the property existed. Since this is no longer the case, and we're quite a few releases away from 17, can we also remove this wording as well. Users on 26 should only be concerned with the "old" to "modern" mapping.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Modified the unnecesarry history.
This PR removes the system property deprecated in JDK 25. If the property is specified at runtime, a warning will be emitted at startup to inform the user that the value is ignored. A corresponding CSR has been drafted as well
Progress
Issues
java.locale.useOldISOCodes
system property (Bug - P4)java.locale.useOldISOCodes
system property (CSR)Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/26419/head:pull/26419
$ git checkout pull/26419
Update a local copy of the PR:
$ git checkout pull/26419
$ git pull https://git.openjdk.org/jdk.git pull/26419/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 26419
View PR using the GUI difftool:
$ git pr show -t 26419
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/26419.diff
Using Webrev
Link to Webrev Comment