RFR: 8260265: UTF-8 by Default [v3]

Naoto Sato naoto at openjdk.java.net
Wed Jul 14 22:07:16 UTC 2021


On Wed, 14 Jul 2021 20:52:54 GMT, Naoto Sato <naoto at openjdk.org> wrote:

>> src/java.base/share/classes/java/io/Console.java line 587:
>> 
>>> 585:                 try {
>>> 586:                     cs = Charset.forName(csname);
>>> 587:                 } catch (Exception ignored) { }
>> 
>> A separate enhancement...
>> I've long thought that should be a way to avoid the exception here.
>> For example,  a Charset.forName(csname, default);
>> The caller might have a default in mind or supply null and then be able to test for null.
>
> Agreed. Will file an RFE for this.

https://bugs.openjdk.java.net/browse/JDK-8270490

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

PR: https://git.openjdk.java.net/jdk/pull/4733


More information about the core-libs-dev mailing list