On Tue, 27 Jun 2023 07:45:34 GMT, Glavo <d...@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. > > Glavo has updated the pull request with a new target base due to a merge or a > rebase. The incremental webrev excludes the unrelated changes brought in by > the merge/rebase. The pull request contains seven additional commits since > the last revision: > > - Merge branch 'openjdk:master' into latin1-no-repl > - Merge branch 'openjdk:master' into latin1-no-repl > - update javadoc > - clean newStringNoRepl1 > - clean newStringNoRepl1 > - Rename jla to JLA > - Create new method JavaLangAccess::newStringLatin1NoRepl
I don't think this is a productive change. It takes a local inconvenience try/catch and spreads the impact over multiple files and packages as well as bulking up JLA. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14655#issuecomment-1609977623