When calling String::newStringNoRepl and String::getBytesNoRepl, we need to use try...catch to handle CharacterCodingException and throw IllegalArgumentException instead of CharacterCodingException to make the calling code cleaner.
------------- Commit messages: - Make the NoRepl methods throw IllegalArgument Changes: https://git.openjdk.org/jdk/pull/16209/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16209&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8318200 Stats: 93 lines in 8 files changed: 10 ins; 58 del; 25 mod Patch: https://git.openjdk.org/jdk/pull/16209.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16209/head:pull/16209 PR: https://git.openjdk.org/jdk/pull/16209