RFR: 8356439: Rename JavaLangAccess::*NoRepl methods [v2]
Volkan Yazici
vyazici at openjdk.org
Fri Aug 8 13:38:31 UTC 2025
> `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`.)
Volkan Yazici 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:
- Group `String` methods by `doReplace` argument
- Merge remote-tracking branch 'upstream/master' into jlaNoRepl
- Replace `requireNonNull` with implicit null checks
- Merge remote-tracking branch 'upstream/master' into jlaNoRepl
- Improve docs of touched methods and add NPE checks
- Convert IAE-throwing methods into CCE-throwing ones
- Rename `JavaLangAccess::*NoRepl` methods
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/26413/files
- new: https://git.openjdk.org/jdk/pull/26413/files/5f555a68..1fb8582e
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=26413&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=26413&range=00-01
Stats: 18798 lines in 552 files changed: 11544 ins; 5896 del; 1358 mod
Patch: https://git.openjdk.org/jdk/pull/26413.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/26413/head:pull/26413
PR: https://git.openjdk.org/jdk/pull/26413
More information about the security-dev
mailing list