Skip to content

Conversation

@naotoj
Copy link
Member

@naotoj naotoj commented Jul 21, 2025

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

  • 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
  • Change requires CSR request JDK-8362953 to be approved

Issues

  • JDK-8355522: Remove the java.locale.useOldISOCodes system property (Bug - P4)
  • JDK-8362953: Remove the 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

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 21, 2025

👋 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
Copy link

openjdk bot commented Jul 21, 2025

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

8355522: Remove the `java.locale.useOldISOCodes` system property

Reviewed-by: jlu, joehw

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

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 csr Pull request needs approved CSR before integration rfr Pull request is ready for review labels Jul 21, 2025
@openjdk
Copy link

openjdk bot commented Jul 21, 2025

@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 Jul 21, 2025
@mlbridge
Copy link

mlbridge bot commented Jul 21, 2025

Webrevs

Copy link
Member

@justin-curtis-lu justin-curtis-lu left a 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.

// 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");
Copy link
Member

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).

Copy link
Member Author

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.

@naotoj
Copy link
Member Author

naotoj commented Jul 22, 2025

Should we also remove the test method, ModuleTestUtil.runModuleWithLegacyCode which passes the now defunct property to the process.

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 -Djava.locale.useOldISOCodes=true run in LocaleTest.java

variant.intern()));
}

public static String convertOldISOCodes(String language) {
Copy link
Member

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

Copy link
Member

@justin-curtis-lu justin-curtis-lu left a comment

Choose a reason for hiding this comment

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

LGTM

* <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. Each
Copy link
Member

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.

Copy link
Member Author

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.

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 21, 2025

@naotoj 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 issue a /touch or /keepalive command to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@naotoj
Copy link
Member Author

naotoj commented Aug 21, 2025

/keepalive

@openjdk
Copy link

openjdk bot commented Aug 21, 2025

@naotoj The pull request is being re-evaluated and the inactivity timeout has been reset.

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 19, 2025

@naotoj 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 issue a /touch or /keepalive command 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 Oct 18, 2025

@naotoj 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 Oct 18, 2025
@naotoj
Copy link
Member Author

naotoj commented Oct 20, 2025

This PR is intended for JDK27. Will reopen it when the time comes

@naotoj
Copy link
Member Author

naotoj commented Dec 8, 2025

/open

@openjdk openjdk bot reopened this Dec 8, 2025
@openjdk
Copy link

openjdk bot commented Dec 8, 2025

@naotoj This pull request is now open

Copy link
Member

@justin-curtis-lu justin-curtis-lu left a comment

Choose a reason for hiding this comment

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

Now that PR is open again, did another take and looks good as before. Minor test comments.

Copy link
Member

Choose a reason for hiding this comment

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

Since we are using JUnit, these assertions would be cleaner as assertEquals.

Copy link
Member Author

Choose a reason for hiding this comment

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

In this test file, there are other locations that use fail. Although it would be preferred to replace them with assertEquals, probably better be cleaned up with a separate issue.

Copy link
Member

Choose a reason for hiding this comment

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

Here and below, I think these errors should be including the old language in the fail message, not the new language. i.e. hebrewOld.getLanguage instead of hebrewNew.getLanguage.

Co-authored-by: Andrey Turbanov <turbanoff@gmail.com>
@openjdk openjdk bot added ready Pull request is ready to be integrated and removed csr Pull request needs approved CSR before integration labels Dec 9, 2025
@naotoj
Copy link
Member Author

naotoj commented Dec 9, 2025

Thanks for the reviews!
/integrate

@openjdk
Copy link

openjdk bot commented Dec 9, 2025

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

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Dec 9, 2025
@openjdk openjdk bot closed this Dec 9, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Dec 9, 2025
@openjdk
Copy link

openjdk bot commented Dec 9, 2025

@naotoj Pushed as commit b2daf9d.

💡 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