On Tue, 17 Oct 2023 11:11:52 GMT, Shaojin Wen <d...@openjdk.org> wrote:
>> 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. > > Shaojin Wen has updated the pull request incrementally with one additional > commit since the last revision: > > revert NoReplTest, from @cl4es 's review src/java.base/share/classes/java/nio/file/Files.java line 3361: > 3359: throw cause; > 3360: } > 3361: throw e; This is wrong, if IAE is thrown for any other reason than CharacterCodingException then it means the JDK is broken. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16209#discussion_r1361937982