RFR: 8318200: String::newStringNoRepl and String::getBytesNoRepl does not throw CharacterCodingException

Shaojin Wen duke at openjdk.org
Mon Oct 16 22:33:26 UTC 2023


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


More information about the nio-dev mailing list