JDK-8330276 : Console methods with explicit Locale
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.io
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2024-04-15
  • Updated: 2024-05-23
  • Resolved: 2024-05-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 23
23 b24Fixed
Related Reports
CSR :  
Sub Tasks
JDK-8331014 :  
Description
Currently, there is no `java.io.Console` methods that explicitly take a Locale as an argument for formatting strings. Adding those overloaded methods would be beneficial, i.e,
```
public Console printf(Locale locale, String format, Object... args)
```
and similar ones for `format()`, `readLine()`, and `readPassword()`.

The motivation here is that there is no alternative for users to do this kind of explicit locale formatting with Console. Other format classes such as String.format(), and its impl Formatter offer such overloads.
Comments
Changeset: 7cff04fc Author: Naoto Sato <naoto@openjdk.org> Date: 2024-05-15 19:28:24 +0000 URL: https://git.openjdk.org/jdk/commit/7cff04fc8a8114a297437aa526b18b6185831eac
15-05-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/18923 Date: 2024-04-23 20:35:43 +0000
24-04-2024