RFR: 8356439: Rename JavaLangAccess::*NoRepl methods [v11]

Alan Bateman alanb at openjdk.org
Tue Sep 2 11:43:48 UTC 2025


On Mon, 1 Sep 2025 16:16:23 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:

>> `NoRepl`-suffixed `String` methods denote methods that do not replace invalid characters, but throw `CharacterCodingException` on encounter. This behavior cannot easily be derived from the method footprints, has been a source of confusion for maintainers, and is not uniformly adopted, e.g., `newStringUTF8NoRepl()` and `getBytesUTF8NoRepl()` does *not* throw `CCE`. This PR replaces the `NoRepl` suffix with `NoReplacement` in method names and consistently uses `throws CCE` in method footprints.
>
> Volkan Yazici has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 27 commits:
> 
>  - Fix `ClassCastException` spotted by `ReadWriteString`
>  - Merge remote-tracking branch 'upstream/master' into jlaNoRepl
>  - Improve Javadoc of touched `encode*()` methods
>  - Rename `exceptionClass` to `exClass`
>  - Rename `NoReplacement` suffix to `OrThrow`
>  - Simplify `encodeWithEncoder` and trim long lines
>  - Improve docs
>  - Improve "sneaky throws"
>  - Improve comment style
>  - Renamed to `malformedASCII`
>  - ... and 17 more: https://git.openjdk.org/jdk/compare/7f0cd648...a69f9fd3

Marked as reviewed by alanb (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/26413#pullrequestreview-3176161682


More information about the security-dev mailing list