Withdrawn: 8310901: Convert String::newStringNoRepl with Latin-1 to String::newStringLatin1NoRepl

duke duke at openjdk.org
Mon Dec 18 22:23:55 UTC 2023


On Mon, 26 Jun 2023 15:25:08 GMT, Glavo <duke at openjdk.org> wrote:

> Added a new method `newStringLatin1NoRepl` to the `JavaLangAccess`.
> 
> Reasons:
> 
> * Most use cases of `newStringNoRepl` use `ISO_8859_1` as the charset, creating a new shortcut can make writing shorter;
> * Since all possible values of `byte` are legal Latin-1 characters, `newStringLatin1NoRepl` **will not throw `CharacterCodingException`**, so users can make the compiler happy without using useless try-catch statements.

This pull request has been closed without being integrated.

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

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



More information about the security-dev mailing list