RFR: 8356439: Rename JavaLangAccess::*NoRepl methods

Roger Riggs rriggs at openjdk.org
Tue Jul 29 13:27:56 UTC 2025


On Mon, 21 Jul 2025 12:10:51 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 removes `NoRepl` suffix from method names and consistently uses `throws CCE` in method footprints. (b4845109e18 passes `tier1,2`.)

If CCE should have a constructor with a message, it can be added if you have a clear idea how it would be used.

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

PR Comment: https://git.openjdk.org/jdk/pull/26413#issuecomment-3132536387


More information about the core-libs-dev mailing list